[Rails] Re: Edit Multiple Model Objects in Single Form

2009-11-19 Thread raji
| % % fields_for(person) do |f| % div %= person.name %: %= f.text_field :age % /div % end % % end % %= submit_tag % % end % Thanks, Raj On Nov 19, 10:03 pm, raji dheer...@gmail.com wrote: Hi Todd, Thanks for the help. I'm getting the following message: undefined

[Rails] Edit Multiple Model Objects in Single Form

2009-11-18 Thread raji
Hi Guys, I'm having a little bit of trouble editing multiple model objects in a single form. I've got a model Person with two attributes: name and gender. For simplicity, gender can be a text input. I'd like to be able to display all Person objects (name and gender) in a form. So, each model

[Rails] validates_uniqueness_of across multiple rows?

2009-10-23 Thread raji
Ok, that's not the best subject line, but I couldn't think of a concise way to describe what I'm trying to do. I've got two models. Grouping simply contains an id and a few other attributes (e.g. rating). A grouping can contain many elements which are stored the Element model. A set of

[Rails] Rails Scaffold for Existing Model

2009-10-12 Thread raji
I've got a Rails app with a 'User' model and a 'users' controller. The users controller handles user registration in the Rails app. I'd like to build a user admin feature using a namespaced controller titled 'admin/users'. Since all I need are the basic CRUD functions, is it possible to

[Rails] Edit is not working properly for radio_button

2008-11-18 Thread Raji Mani
Hi, I m trying to edit contact info.. all other data other than radio button are getting reflected in edit page .. But the same works fine while creating new contact i.e it allows only one email id to be set as primary but the same not working in edit.. it allows user 2 select both radio

[Rails] can't convert String into Integer error on updating

2008-11-17 Thread Raji Mani
% form_for (:contact,:url={:controller='contact',:action = 'update',:id = @contact},:html= {:onSubmit = 'return validate()', :id = 'savecontact'} ) do -% . . . . table cellpadding=4 cellspacing=0 border=1 width=100% class=details tr th colspan=4 align=left bgcolor=#797ba8strongfont

[Rails] Re: how to retrive multiple vaules from a view for a text_field!

2008-11-12 Thread Raji Mani
Frederick Cheung wrote: On Nov 12, 5:18�am, Raji Mani [EMAIL PROTECTED] wrote: issue is how do i differentiate radio buttons with the same name.. both the radio buttons are getting selected :(.. here is the code the builders yielded by form_for and fields_for have the same name, so

[Rails] how to retrive multiple vaules from a view for a text_field!

2008-11-11 Thread Raji Mani
Hi, I have view page which takes all the information like contact's emails , phones no's etc and saves different tables. I want to save more than one email id's for a particular contact. view page is something like this.. . . Email 1 : %= select 'email', 'email_type', %w(Business Personal),

[Rails] Re: how to retrive multiple vaules from a view for a text_field!

2008-11-11 Thread Raji Mani
Frederick Cheung wrote: On Nov 11, 9:46�am, Raji Mani [EMAIL PROTECTED] wrote: Hi, I have view page which takes all the information like contact's emails , phones no's etc and saves different tables. I want to save more than one email id's for a particular contact. view page is something