Hi Ryan,
  This is totally the right place for that kind of question.  Looks like you 
got a basic answer already, but just to make sure.  You need to remove the 
attr_accessor line from your Model. ActiveRecord creates methods for things 
like end_address=.  Attr_accessor is also defining end_address= but with out 
the code that sets the database entry. 

  Also, I want to warn you about using a model and controller named Route. This 
is going to be confusing for future you and other future developers and may 
cause potential name conflicts with the Rails Router.

Best,
Rob

On Feb 24, 2012, at 18:29 , Ryan Ringler wrote:

> I apologize in advance if this is not what the mailing list is for (I'm very 
> new to ruby, rails, and the SDRuby mailing list) but I was hoping someone 
> here could help me out on a rails issue that seems to have stumped me.  I'm 
> trying to save an ActiveRecord record with my POST params, but ActiveRecord 
> seems to be saving 'nil' data instead of my params.  Would somebody mind 
> taking a moment and explaining to me what I'm doing wrong.
> 
> Instead of trying to format my code in email, it can be found at: 
> http://stackoverflow.com/questions/9440436/rails-activerecord-ignoring-params-and-saving-nil-data
> 
> -- 
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to