[Rails] Re: Redbox basic implementation question

2009-03-06 Thread Tonypm
Have a look at http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/f08f412c04e20ed1/d9f22348d07245f5?lnk=gstq=++Open+a+(redbox)+modal+popup+from+inside+a+controller%3F++#d9f22348d07245f5 This was a quickfix, I haven't gone to great lengths to investigate the js code, but the

[Rails] how to catch AJAX calls on session-timeout?

2009-03-06 Thread MaD
hallo everybody, my problem is the following: on one of our rails-apps we implemented session-expiry, so that the user gets redirected to our login-page whenever his session has timed- out. this is working fine for normal http-requests. however, for AJAX- calls that only update a certain div of

[Rails] Re: How to speed up ActiveResource?

2009-03-06 Thread Michael Rigart
Robert Walker wrote: Michael Rigart wrote: I' running in production. I have noticed that development is slower then production, but the production speed is still far from acceptable. The diffrence between using ActiveRecord and ActiveResource is huge. Yep, web services are generally much

[Rails] Re: database question

2009-03-06 Thread Colin Law
2009/3/5 Pesho Petrov rails-mailing-l...@andreas-s.net Colin Law wrote: Am I right in thinking that the member/group combination for a message is always the same member/group that appears in a membership record? If so then would it be better to have Membership: has_many :messages

[Rails] Re: before_filter :action_name OR :action_name

2009-03-06 Thread Colin Law
You could just have one new filter that calls the other two as appropriate. 2009/3/6 Frederick Cheung frederick.che...@gmail.com On Mar 5, 11:46 pm, Shuaib85 shuaib.za...@gmail.com wrote: basically, I made my own user access level. In one case, the admin and the client can delete their

[Rails] Re: Connection Pooling on Rails 2.2.2 (Windows Vista)

2009-03-06 Thread Chris Kottom
In order to take advantage of connection pooling, you need an adapter that supports multithreading. The basic MySQL adapter doesn't do that. Check out http://github.com/methodmissing/mysqlplus_adapter/tree/master for a pretty detailed walkthrough to set this up. On Thu, Mar 5, 2009 at 4:09 PM,

[Rails] Re: to get multiple check_box values in controller

2009-03-06 Thread Darren Jeacocke
Is there a way to have this working while being able to use labels, and being valid HTML? Ie, unique IDs for the inputs? no - you want the output to be input id=user[language_id][] name=user[language_id][] type=checkbox value=3 / and then params[:user][:language_id] will be an array

[Rails] Gem update problem

2009-03-06 Thread Jose vicente Ribera pellicer
Hi, firs at all sorry if my english is not the best. I'm working with OSX and i have a problem trying to launc localhost. In mongrel.log i can see this message: Agent Log is found in /Users/jose/rankia/log/newrelic_agent.3000.log /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in

[Rails] Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread gundest...@gmail.com
I have an app with the following models: course belongs_to :semester semester has_many: courses belongs_to :education education has_many :semesters In my old app (rails 1.2.6) I was able to access variables via controller @courses = Course.find(:all) view file: % for course in @courses % %=

[Rails] Replace

2009-03-06 Thread Fresh Mix
What is the easiest way to replace record in database? Better that this: @old = Order.find(5) @new = Order.find(90) @old.x = @new.x @old.y = @new.y @old.z = @new.z @old.w = @new.w @old.p = @new.p @old.r = @new.r ... @old.save So now @old = @new except @old.id and @old.created_at -- Posted

[Rails] Re: Replace

2009-03-06 Thread Franz Strebel
On Fri, Mar 6, 2009 at 10:35 AM, Fresh Mix rails-mailing-l...@andreas-s.net wrote: What is the easiest way to replace record in database? Better that this: @old = Order.find(5) @new = Order.find(90) @old.x = @new.x @old.y = @new.y @old.attributes = @new.attributes or you can even get

[Rails] Re: How can i know weather a record is saved or not?

2009-03-06 Thread --- z...@m ---
record.save? will return Boolean. i just want to know weather it is saved ? i don want to save it or try to save it ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Re: How can i know weather a record is saved or not?

2009-03-06 Thread MaD
i just want to know weather it is saved ? i don want to save it or try to save it ! well, if you dont try to save it, the answer to your question is quite easy: no. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: database question

2009-03-06 Thread Pesho Petrov
Colin Law wrote: Yes. The question is, of course, has any of this helped with your original question? I think it has as you can now find all messages where the membership.role_id is admin and membership.member_id is the member you want yes, we are back to the first question :) you are

[Rails] Re: How can i know weather a record is saved or not?

2009-03-06 Thread Franz Strebel
On Fri, Mar 6, 2009 at 10:52 AM, --- z...@m --- krishnaprasadva...@gmail.com wrote: record.save? will return Boolean. i just want to know weather it is saved ? i don want to save it or try to save it ! You can do record.new_record? to check if it is a new record

[Rails] Re: database question

2009-03-06 Thread Colin Law
2009/3/6 Pesho Petrov rails-mailing-l...@andreas-s.net Colin Law wrote: Yes. The question is, of course, has any of this helped with your original question? I think it has as you can now find all messages where the membership.role_id is admin and membership.member_id is the member you

[Rails] Re: database question

2009-03-06 Thread Pesho Petrov
lol, that's great! THANKS A LOT, Colin ! ! ! Have a great weekend :) Petar -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Re: Gem update problem

2009-03-06 Thread Jose vicente Ribera pellicer
solved with gem install ar_mailer -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] How to populate form dropdown with 2nd item of model

2009-03-06 Thread ChrisYo
I'm trying to create a dropdown list that's populated from a model but which has the 2nd item in the model as the default selection. This is possible. Here's the model snippet. PROPERTY_TYPES = [['Choose', ''], ['Residential', 'Residential'],

[Rails] Re: how to catch AJAX calls on session-timeout?

2009-03-06 Thread Frederick Cheung
On Mar 6, 8:31 am, MaD mayer.domi...@gmail.com wrote: hallo everybody, my problem is the following: on one of our rails-apps we implemented session-expiry, so that the user gets redirected to our login-page whenever his session has timed- out. this is working fine for normal

[Rails] Re: errors when asking for index.html

2009-03-06 Thread Frederick Cheung
On Mar 6, 7:49 am, Luca Scaljery rails-mailing-l...@andreas-s.net wrote: Hi All I'm trying setup a RoR project. So far I've only done some HTML stuff (nothing with controller, models etc) Looks like your index.html is referencing a javascript file that doesn't exist (at least not at the

[Rails] Re: RoR for dummies .. from nothing to knowlege

2009-03-06 Thread Simone R.
MaD wrote: # controller: def show_all_models # require all of your models so they get loaded Dir.glob(RAILS_ROOT + '/app/models/*.rb').each { |file| require file } # find all subclasses of ActiveRecord @all_models = Object.subclasses_of(ActiveRecord::Base) end # view: ul %

[Rails] Re: Advanced Search In Ruby on Rails.

2009-03-06 Thread Frederick Cheung
%= stylesheet_link_tag 'dynamicStyling' % You're going have to trim this down a lot - people answer questions on this list out of good will and for most people that doesn't include reading 500+ lines of code. I will say this: global variables yuck, I hope all those * symbols aren't actually in

[Rails] Deleting images with attachment_fu

2009-03-06 Thread Richard Yoo
Hi I'm trying to delete a user's profile image that was uploaded with attachment_fu directly to storage, without going to the view of the Photo controller. Basically the model is set up so user has many photos photos belong to user @user = User.find(params[:id]) @photo =

[Rails] Re: Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread Frederick Cheung
On Mar 6, 9:35 am, gundest...@gmail.com gundest...@gmail.com wrote: In my old app (rails 1.2.6) I was able to access variables via controller @courses = Course.find(:all) view file: % for course in @courses % %= course.name % - this line works %= course.semester.name % - this is now

[Rails] Re: Error during rake db:migrate

2009-03-06 Thread Dharmdip Rathod
install gem 'name ' =gem install mysql or dowanload for your rails version and install locally from rubyforge and put it in your root directory c:/rails root/gem install -l mysql -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] SQL Console to View

2009-03-06 Thread Lubomir Herko
Hi, I have one request.. is there any way, how can I display SQL console results in view? I mean, for example I have PostgreSQL server, and a simple form, where user can put any SQL command, which will be executed via ActiveRecord::Base.connection.execute(sql) and the actual response (if

[Rails] Re: errors when asking for index.html

2009-03-06 Thread Luca Scaljery
Frederick Cheung wrote: On Mar 6, 7:49�am, Luca Scaljery rails-mailing-l...@andreas-s.net wrote: Hi All I'm trying setup a RoR project. So far I've only done some HTML stuff (nothing with controller, models etc) Looks like your index.html is referencing a javascript file that doesn't

[Rails] Re: How can i know weather a record is saved or not?

2009-03-06 Thread --- z...@m ---
You can do record.new_record? to check if it is a new record Thank you thats what i want ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Gem update problem

2009-03-06 Thread Jose vicente Ribera pellicer
Jose vicente Ribera pellicer wrote: solved with gem install ar_mailer Ummm, not solvd at all. Now I can use my localhost but when I try to update my gems I see the same error. :( I can work fine, but i don't like to see this kinds of errors when i try to update my gems. Any help please? --

[Rails] Re: routes.rb ... killing the apps ??

2009-03-06 Thread Simone R.
Matt Jones wrote: I agree with this - the problem you ran into was that the routes file didn't get reloaded correctly. This is a known issue (see http://rails.lighthouseapp.com/projects/8994/tickets/981-fix-for-routing-optimization-code ) with the 2.1 series. I would *highly* recommend that

[Rails] Re: How to pass current value of form field in link_to?

2009-03-06 Thread Jeba Momin
John Yerhot wrote: try this: %= link_to Preview Post, {:action = :preview, :id = @topic.id}, {:onclick = this.href +='?body='+encodeURIComponent($F ('id_of_the_form_element')); return true, :id = 'link', :target = _blank} % Hi John, I have a similar requirement. I need to pass the value

[Rails] Re: comprehension question about controllers

2009-03-06 Thread Heinz Strunk
No opinions? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To

[Rails] Re: how to catch AJAX calls on session-timeout?

2009-03-06 Thread MaD
i'm gonna try that. thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send

[Rails] Re: comprehension question about controllers

2009-03-06 Thread Colin Law
I would suggest you have a look at http://www.rubyrailways.com/great-ruby-on-rails-rest-resources/ 2009/3/6 Heinz Strunk rails-mailing-l...@andreas-s.net No opinions? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: upload file to save

2009-03-06 Thread norricorp
I tried this and got an error. My stuff was based on this website - http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm. I wanted a photo stored in images/user-id/ whereas this only uses images/. So if I remove the user-id directory, and do this, I still get an empty file. Thanks

[Rails] Re: comprehension question about controllers

2009-03-06 Thread Heinz Strunk
Thanks, I'll have a look. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com

[Rails] Re: upload file to save

2009-03-06 Thread MaD
well, you got a few errors here and there. for example: path = File.join(directory, user.user_id, filename) i guess user doesn't have a user_id but an id, so try: path = File.join(directory, user.id, filename) if you post your error-message, we can try to get there step by step. but in

[Rails] Re: Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread gundestrup
Error: You have a nil object when you didn't expect it! The error occurred while evaluating nil.name the view %= link_to course.semester.name, :controller = 'reporting', :action = 'new', :id = course.id % the database: On Mar 6, 11:35 am, Frederick Cheung frederick.che...@gmail.com wrote:

[Rails] Re: Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread gundestrup
Error: You have a nil object when you didn't expect it! The error occurred while evaluating nil.name the view %= link_to course.semester.name, :controller = 'reporting', :action = 'new', :id = course.id % the database: courses --- name semester_id semesters name

[Rails] Re: How to pass current value of form field in link_to?

2009-03-06 Thread Jeba Momin
Joe Peck wrote: Muchas gracias, that is close to perfect. The only problem is if I hit Preview Post multiple times, it keeps adding onto body, but I can fix that problem. It's times like these that I realize I need to learn more javascript. Hi Joe Can u please share wid me how did u

[Rails] Multiplicate values of 2 textfields in a multi model form

2009-03-06 Thread M. Schaefer
Hi all, I tried to multiplicate two form fields in a tablerow just to inform the user and without bothering the server. I'm sure this seems to be a simple javascript problem, but all I got running was the following example: tr class=%= cycle('shade1', 'shade2') % itemtablerow % fields_for

[Rails] Google meshups

2009-03-06 Thread krishna
Hello guys, How to change the google Maptype to hybrid instead of satelite/map --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Rails 2.2 - Getting started - need some help

2009-03-06 Thread Johan Van mol
Hi, I've used ROR in the past, but recently started working with version 2.2. I don't seem to be able to get started: # I create a rails app: @rails music_library@ # I create a db using an SQlite gui: @music_library_DB.rsd@ # I edit the config/database.yml file: @development: adapter:

[Rails] Re: comprehension question about controllers

2009-03-06 Thread Heinz Strunk
Didn't tell me much I didn't know already but what it didn't tell is how am I supposed to keep my application RESTful if I need to load various resources in one single action? I mean it's easy to stay RESTful in small applications like a blog with a small amount of resource and maybe 2 or 3

[Rails] Re: Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread MaD
in that view, does %= course.class % %= course.semester_id % give you something like this Course 32 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: Rails 2.2 - Getting started - need some help

2009-03-06 Thread Johan Van mol
Sorry, I thought this forum could understand Textile... Here we go again: Hi, I've used ROR in the past, but recently started working with version 2.2. I don't seem to be able to get started: 1/ I create a rails app: rails music_library 2/ I create a db using an SQlite gui:

[Rails] Re: Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread gundestrup
jep, you are 100% correct. On Mar 6, 1:47 pm, MaD mayer.domi...@gmail.com wrote: in that view, does   %= course.class %   %= course.semester_id % give you something like this   Course   32 --~--~-~--~~~---~--~~ You received this message because you are

[Rails] How: From database to schema.rb file ?

2009-03-06 Thread Tom Ha
Hi there! Is there a way to get a complete/up-to-date schema.rb file, based on just the database? (without using any migration files...) === Background: 1. I had stopped using migrations at some point in time and then have modified my db manually, using phpMyAdmin.

[Rails] Re: How: From database to schema.rb file ?

2009-03-06 Thread Maurício Linhares
rake db:schema:dump - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Fri, Mar 6, 2009 at 10:15 AM, Tom Ha rails-mailing-l...@andreas-s.net wrote: Hi there! Is there a way to get a complete/up-to-date schema.rb file, based on just the

[Rails] Re: How: From database to schema.rb file ?

2009-03-06 Thread Tom Ha
Thanks a lot ! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To

[Rails] Re: 2.2.2 issue - find :joins combining named assoc and SQL string

2009-03-06 Thread Kevin Gilpin
I have the same problem. A query which was previously: macro_step = Step.find :first, :include = [ :parameters ], :conditions = [ name = 'delegate_id' AND int_v = ?, macro.id ] failed with the message ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'name' in 'where

[Rails] Re: Image Crop

2009-03-06 Thread Nike Mike
Alex Wayne wrote: Dustin wrote: I want to make a program that will be able to take an image file and crop a square at a given coordinate value (X,Y). I would tell it the X,Y and the size of the crop ie. 350x350. The X,Y would be the center of the newly created image. Thanks for you

[Rails] Re: Advanced Search Ruby on Rails

2009-03-06 Thread Phlip
khim sreang wrote: Thank you for ur advice, My work is that I want to make advanced search by using check box and radio button.all the value in checkboxs i put in search form and i compare with value in database if it is correct then the result will show in table.I have

[Rails] attachment_fu has_attachment model logic reasoning?

2009-03-06 Thread Chris Dekker
Both Attachment_fu and Paperclip use something like 'has_attachment' to work their magic on an existing model like a User in the context of a profile picture or something like that. I find this idea pretty constricting, as it doesn't allow for multiple profile pictures for example. Or at least I

[Rails] Re: Rails 2.2 - Getting started - need some help

2009-03-06 Thread Chris Kottom
You don't. Dynamic scaffolding was deprecated after Rails 1.2.x, I believe. Rails 2.0 and beyond actually generate the view files as ERB depending on the model attributes you provide on the command line to create the scaffold. The preferred way to create a new scaffold now will look something

[Rails] creating a form_for with field values?

2009-03-06 Thread Heinz Strunk
Hey guys, I'm having a problem creating a form with field values. I'm using form_for and don't really know how to access the field values. I've got a table character_attributes and character_attribute_types. character_attribute_types contains following data: id name X hiding X strength etc.

[Rails] New Version of IBM_DB Rails Adapter/Driver for IBM DataServers now available

2009-03-06 Thread Praveen
Hi All, New version of IBM_DB gem 1.0.2 is now available. This release provides support for specifying the connection timeout value in the adapter and hence in turn now you can specify the timeout value in the database.yml file of the Rails application. This release also provides fix for few

[Rails] JasperReports and Ruby on Rails = disappeared?

2009-03-06 Thread InventoryTrackers
I've been working for the last two weeks to follow the instructions for integrating Jasper Reports ( iReport) with Ruby on Rails and was ready to take the last steps when the article at http://wiki.rubyonrails.org/rails/pages/howtointegratejasperreports suddenly disappeared? Does anyone out there

[Rails] Re: Deleting images with attachment_fu

2009-03-06 Thread Ar Chron
any ideas? You shouldn't be passing in params[:id] in your photos find... params[:id] is your users_id, not a photo_id. have you tried just @photos = @user.photos Then you'll have to iterate across all the photos returned to delete each one. -- Posted via http://www.ruby-forum.com/.

[Rails] variable variable names... are you confused??

2009-03-06 Thread Roger Muthton
Hi Guys, I got a helper method that I want to use more than once. The only thing that will change will be the variable that is used to collect the data. For example; def render_blocks position = 0 @variable.collect { |question, answer| position += 1 h3#{position}. a

[Rails] newest fashion J4.5+J23,J9+J23+AF1

2009-03-06 Thread Great Shoes
hello,friend, first hope everything goes well to you www dot shoes-great dot com is our web. welcome to surf here pls tell me and choose nike shoes/jean/hoody/sweater/t-shirt/jacket/hat/ipod/hangbag/watch model and size u need. i think you will find something you interested,and if you need,pls

[Rails] Re: variable variable names... are you confused??

2009-03-06 Thread Franz Strebel
On Fri, Mar 6, 2009 at 3:14 PM, Roger Muthton rails-mailing-l...@andreas-s.net wrote: Hi Guys, I got a helper method that I want to use more than once. The only thing that will change will be the variable that is used to collect the data. For example; def render_blocks    position = 0  

[Rails] Problem with nested shallow in admin namespace

2009-03-06 Thread Pietia
Hi all. I have admin namespace with project resource connected to it ( as written in code below ). I need only to access blocks/sections/menus ( which are all connected to projects in admin namespace ) via project ( for example admin/projects/1/menu/1 ). I thought about shallow = true to make

[Rails] Markaby a3e5f1 (github/why) with Rails 2.2.2

2009-03-06 Thread Simon Josi
I encounter the following error: NoMethodError (undefined method `call' for Markaby::Rails::ActionViewTemplateHandler:Class): Full Trace: http://gist.github.com/74906 /simon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] Guru Web Developer - Pune

2009-03-06 Thread vandana
If you are a master of either Ruby on Rails (or Hibernate/Swing or other agile web development frameworks), JavaScript, HTML/CSS or Flash/ Flex, and have always dreamed of working in an energetic, highly skilled and entrepreneurial team of like minded Internet Junkies, your dream may have just

[Rails] Re: Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread Frederick Cheung
And is there a semester with that id ? Fred On Mar 6, 12:53 pm, gundestrup gundest...@gmail.com wrote: jep, you are 100% correct. On Mar 6, 1:47 pm, MaD mayer.domi...@gmail.com wrote: in that view, does   %= course.class %   %= course.semester_id % give you something like this  

[Rails] Re: 2.2.2 issue - find :joins combining named assoc and SQL string

2009-03-06 Thread Frederick Cheung
On Mar 6, 1:48 pm, Kevin Gilpin rails-mailing-l...@andreas-s.net wrote: I have the same problem. A query which was previously:   macro_step = Step.find :first, :include = [ :parameters ],     :conditions = [ name = 'delegate_id' AND int_v = ?, macro.id ] failed with the message  

[Rails] Re: Association broken when upgrading from rails 1.2.6 to 2.2.2

2009-03-06 Thread gundestrup
This is so embarrising. No, when doing rake up and down, all of my fixtures files are interpeted differently. so now I have to specify the id column, it's not just a normal incriment column, when migrating :-( Sorry for all the fuss, I just completely missed this. On Mar 6, 3:28 pm, Frederick

[Rails] routes.rb problem

2009-03-06 Thread Salil Gaikwad
I am having problem with routes.rb I want to access same page using two different url's for that i had done following in routes.rb 1] map.connect 'projects/:project_id/issues/:action', :controller = 'issues' so when my url is http://localhost:3000/projects/xyz/issues/new i access the

[Rails] Re: JasperReports and Ruby on Rails = disappeared?

2009-03-06 Thread Charles Johnson
On Fri, Mar 6, 2009 at 8:11 AM, InventoryTrackers inventorytrack...@gmail.com wrote: I've been working for the last two weeks to follow the instructions for integrating Jasper Reports ( iReport) with Ruby on Rails and was ready to take the last steps when the article at

[Rails] Routes.recognize_path on more complicated Routes

2009-03-06 Thread Danny Tipple
For a permissions system i'm writing i'm extending the standard link_to helpers to check if a user has a permission to perform that action before displaying a link to clean-up my code so i don't have to put if checks all over them. I'm trying to use..

[Rails] Re: variable variable names... are you confused??

2009-03-06 Thread Roger Muthton
Just declare a parameter in your helper method à la: def render_blocks(my_variable) my_variable.collect end You then call it in your view and pass the variable that is valid for that view. %= render_blocks(@free) % grand. cheers -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Can map.root to point to a static html file in public d

2009-03-06 Thread Tony Tony
Hassan Schroeder wrote: On Thu, Mar 5, 2009 at 7:20 PM, Tony Tony rails-mailing-l...@andreas-s.net wrote: I'm trying to get map.root to point to a static html file in the public directory. I can't just have index.html since I'm doing subdomains and any index.html file in there will be used

[Rails] Get model.create(params) to silently skip unknown attributes

2009-03-06 Thread Fernando Perez
Hi, I have a remote website that will be sending me some data which I want to save in one of my models. The problem is that it will also send some attributes such as attribute_1, attribute_2, etc which I don't want to save. Currently if I do: my_model.create(params), it will not pass as it has

[Rails] Re: How to Get value of text_field ??

2009-03-06 Thread bill walton
Hi Jeba, On Fri, 2009-03-06 at 06:55 +0100, Jeba Momin wrote: Hi, I have a text field as: %= text_field :contact ,:name,:class='roundRect',:id='name' % Then on click of a link I want to pass the value in this text field to a controller method. I do not want to use a form and form submit.

[Rails] Re: how to use observe_field with text_field

2009-03-06 Thread bill walton
On Thu, 2009-03-05 at 23:04 -0800, daociyiyou wrote: thanks. You're welcome. Best regards, Bill --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Can map.root to point to a static html file in public d

2009-03-06 Thread Hassan Schroeder
On Fri, Mar 6, 2009 at 7:37 AM, Tony Tony rails-mailing-l...@andreas-s.net wrote: What I want is to have my subdomain root (ex. user.app.com) to point to the user login page (which I currently have working) and the domain root (ex. app.com) to have a typical welcome/signup index page. This

[Rails] Re: Guru Web Developer - Pune

2009-03-06 Thread Chris Kottom
Could you please not do that? On Fri, Mar 6, 2009 at 12:22 PM, vandana vandan...@gmail.com wrote: If you are a master of either Ruby on Rails (or Hibernate/Swing or other agile web development frameworks), JavaScript, HTML/CSS or Flash/ Flex, and have always dreamed of working in an

[Rails] ActionController : Exception caught

2009-03-06 Thread Yati Tandon
I am running MySql 5.0.77 and Ruby 2.2.2 I am able to add records - howeevr when I start the server, I am geting following error message. Please help. I am anot able to see the GUI. ArgumentError in UsersController#index NULL pointer given RAILS_ROOT: C:/workspace/testapp Application Trace |

[Rails] Re: Can map.root to point to a static html file in public d

2009-03-06 Thread Tony Tony
Hassan Schroeder wrote: On Fri, Mar 6, 2009 at 7:37 AM, Tony Tony rails-mailing-l...@andreas-s.net wrote: What I want is to have my subdomain root (ex. user.app.com) to point to the user login page (which I currently have working) and the domain root (ex. app.com) to have a typical

[Rails] Re: Can map.root to point to a static html file in public d

2009-03-06 Thread Conrad Taylor
On Fri, Mar 6, 2009 at 8:53 AM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Fri, Mar 6, 2009 at 7:37 AM, Tony Tony rails-mailing-l...@andreas-s.net wrote: What I want is to have my subdomain root (ex. user.app.com) to point to the user login page (which I currently have

[Rails] Re: Can map.root to point to a static html file in public d

2009-03-06 Thread Tony Tony
Conrad Taylor wrote: In short, the standard way of providing the root page of a web site is to use an index.[php|html|htm|...] but feel free to use one of the methods above to achieve your result. Good luck, -Conrad FANTASTIC! Thanks a lot for the detailed post. -Tony -- Posted

[Rails] Cut off text if its too big for a table? (Resize table?)

2009-03-06 Thread Tim Mcd
I made a nice (imo), custom table for my posts while following a simple blog in Rails tutorial. I was wondering tho if I can set a maximum width for a table row/cell and have it cut off text if its too long to fit, so it just shows a preview of the blog post. Also, is it possible for the table to

[Rails] Re: routes.rb problem

2009-03-06 Thread Bob Martens
Why not just map.resources :issues and go from there? That is a RESTful resource, right? On Mar 6, 8:39 am, Salil Gaikwad rails-mailing-l...@andreas-s.net wrote: I am having problem with routes.rb I want to access same page using two different url's for that i had done following in routes.rb

[Rails] Starling/Workling Questions

2009-03-06 Thread TomRossi7
I'm pretty happy with how easy the setup and configuration is! I do have a couple questions that I would love some help with: 1. How do I get logging? While workling is running in production, I do not see any logging? 2. Is there a better way to start the services in production? Currently I

[Rails] Re: routes.rb problem

2009-03-06 Thread tomrossi7
Where does the application take you when you go to /issues/new? You can always comment out other routes until you find the one that is causing the conflict... --Tom On Mar 6, 9:39 am, Salil Gaikwad rails-mailing-l...@andreas-s.net wrote: I am having problem with routes.rb I want to access

[Rails] ActiveRecord::Base

2009-03-06 Thread Lubomir Herko
Why this doesn't work? ActiveRecord::Base.connection.execute(\\d) ? I use PostgreSQL server and this should be command to get list of all tables within a database. Is there a problem with privileges or PGSQL driver for rails doesn't support it? -- Posted via http://www.ruby-forum.com/.

[Rails] Re: ActiveRecord::Base

2009-03-06 Thread Frederick Cheung
On 6 Mar 2009, at 18:26, Lubomir Herko wrote: Why this doesn't work? ActiveRecord::Base.connection.execute(\\d) ? Because you're confusing commands the the psql application supports versus actual sql queries you can run. Execute lets you run arbitrary sql expressions, which \\d isn't

[Rails] Multiple args with named scope.. problem

2009-03-06 Thread Morgan Morgan
i'm trying to figure out what i'm doing wrong here. named_scope :schedule_limits, lambda { |*args| {:conditions = [id = ? and sched_start ? and sched_start ? , ( args[0], args[1], args[2]) ]} } it just produces the error /dir/dir/dir/schedule.rb:9: syntax error, unexpected ')', expecting

[Rails] Re: ActiveRecord::Base

2009-03-06 Thread Lubomir Herko
Frederick Cheung wrote: On 6 Mar 2009, at 18:26, Lubomir Herko wrote: Why this doesn't work? ActiveRecord::Base.connection.execute(\\d) ? Because you're confusing commands the the psql application supports versus actual sql queries you can run. Execute lets you run arbitrary sql

[Rails] Re: Multiple args with named scope.. problem

2009-03-06 Thread Frederick Cheung
On 6 Mar 2009, at 18:40, Morgan Morgan wrote: i'm trying to figure out what i'm doing wrong here. named_scope :schedule_limits, lambda { |*args| {:conditions = [id = ? and sched_start ? and sched_start ? , ( args[0], args[1], args[2]) ]} } it just produces the error

[Rails] Re: Multiple args with named scope.. problem

2009-03-06 Thread Morgan Morgan
well that got rid of the first error but now it says that i undefined method `schedule_limits' -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Re: Guru Web Developer - Pune

2009-03-06 Thread Mathieu Rousseau
Do what? You meant Hibernate/Spring right? On Fri, Mar 6, 2009 at 1:58 PM, Chris Kottom chris.kot...@gmail.com wrote: Could you please not do that? On Fri, Mar 6, 2009 at 12:22 PM, vandana vandan...@gmail.com wrote: If you are a master of either Ruby on Rails (or Hibernate/Swing or

[Rails] Re: Guru Web Developer - Pune

2009-03-06 Thread Mathieu Rousseau
http://www.sapnasolutions.com/ is down... On Fri, Mar 6, 2009 at 4:59 PM, Mathieu Rousseau mathieu.rousseau...@gmail.com wrote: Do what? You meant Hibernate/Spring right? On Fri, Mar 6, 2009 at 1:58 PM, Chris Kottom chris.kot...@gmail.comwrote: Could you please not do that? On Fri,

[Rails] Re: routes.rb problem

2009-03-06 Thread Bob Martens
Can you show us your rake routes to see what you have defined? On Mar 6, 12:21 pm, tomrossi7 t...@themolehill.com wrote: Where does the application take you when you go to /issues/new?  You can always comment out other routes until you find the one that is causing the conflict... --Tom On

[Rails] formulas in mysql database for rails app

2009-03-06 Thread eyal
Hello, any ideas how I might store a formula in a mysql database and access it through my rails application. For example, say I have a model Formula, which has two integer variables formula.var1 and formula.var2. And each formula should have a stored formula that is made up of only addition and

[Rails] Re: How to fix radius of the open flash chart in ruby

2009-03-06 Thread Harry Seldon
Why not just set the size of the chart? I am not sure you can set the radius. H http://harryseldon.thinkosphere.com Radha Langde wrote: hello Dhamdip, I hv already visited this url but no specific info found. It hs been specified on some sites that we can set radius in piechart.json

[Rails] rake test:functionals - Task not supported by ''

2009-03-06 Thread Fritz Anderson
I have a Rails project in which I've been using rake test tasks with great success. At some point (there were a few changes in the interim), rake started aborting test tasks. Here is the dialog: === $ rake test:functionals (in /Users/fritza/myproject) rake aborted! Task not supported by '' (See

[Rails] Re: Multiple args with named scope.. problem

2009-03-06 Thread Frederick Cheung
On Mar 6, 7:04 pm, Morgan Morgan rails-mailing-l...@andreas-s.net wrote: well that got rid of the first error but now it says that i undefined method `schedule_limits' That sounds like it's coming from a different line. show the whole error message and model and things might become clearer.

  1   2   >