i don't know if location is a special term or not. But I have a question, do
have an attr_accessible line in your user model?
If you do, check that you have the location attribute listed there.

On Fri, Feb 11, 2011 at 10:58 AM, Tim Uckun <[email protected]> wrote:

> I am having a confounding issue  and I hoping somebody can give me a
> clue as to what is happening.
>
> I have one field in my table which is not updating via the form. It
> updates fine if I extract the information from the params and do it
> manually in the controller.  On this form the ebmedded form is also
> not updating any of the child records but first I'd like to figure out
> what is going on here.
>
> Basically you have this User has_many :contact_methods.
>
> The form looks like this.
>
> - form_for (@user, :url => edit_profile_url) do |f|
>  = f.label :email
>  %br/
>  = f.text_field :email,  :class => "text-input"
>  %br/
>  = f.label :name
>  %br/
>  = f.text_field :name,  :class => "text-input"
>  %br/
>  = f.label :location
>  %br/
>  = f.text_field :location, :class => "text-input"
>  %br/
>  = f.label :skills_list , 'My skills are (comma separated list)'
>  %br/
>  = f.text_field :skill_list, :label => 'My skills are (comma
> separated list)' ,  :class => "text-input"
>  %br/
>  = f.label :bio
>  %br/
>  = f.text_field :bio, :label => ' Brief personal summary'   , :class
> => "text-input"
>  %br/
>  = render 'contact_methods' , {:f => f}
>  =f.submit
>
> Every field in here is updatable except the location field. For some
> odd reason it won't update the location field when you submit the
> form.
>
> If I do this in the controller it works fine.
>
> @user.update_attributes(params[:user])
> location = params[:user][:location]
> @user.location = location if location
>
> so why is only this one field not updating while everything else is?
> Is "location" a special term?
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to