On Dec 4, 4:35 pm, Michael Baldock <[email protected]> wrote:

> but again the values didn't change.
>
> Could anyone please tell me
>
> a - how to update values of active record properly in this case?

Either params doesn't contain what you think it is and so the call to
update_attributes doesn't do anything, or you've got validations
preventing the record from saving or you've got some attr_protected/
attr_accessible calls somewhere. Other than that
@event.update_attributes(params[:suggested_event]) is fine, as long as
params[:suggested_event] contains the right thing.


> b - why console doesn't recognise 'params'
because params is an instance method that controllers have. It would
be pretty meaningless in the console, since there is no associated
request.

> and
> c - why on earth might the 2nd try have worked once, and then never
> again! (unless it was a mirage?!)

Must have been a mirage - it's completely meaningless.

Fred
>
> Any help massively appreciated
>
> Mike
>
> ps. I deliberately wanted the values to be copied over, so that
> afterwards I could 'tweak' each event individually, for example by
> having a very slightly different latitude on multiple events in the same
> venue means on my google map view of how to get to them, I get multiple
> pins!!
>
> --
> Posted viahttp://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 [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