On Nov 6, 7:21 pm, Mark Lohstroh <[email protected]> wrote: > Yeah, the table includes everything needed. > > def self.up > create_table :users do |t| > t.string :name > t.string :email > t.integer :variable > t.timestamps > end > end > > And the variable isn't nil. I default it to 0 when i create the user. > I'm still confused as to why this isn't working... > Everything goes like it should but the user just will not save itself > and update the variable. Can I use the update_attributes? > It doesn't sound like it's the saving part that is the problem, it's how you're manipulating the object before hand. What is on the line that throws the exception? Your controller looks a bit weird too - @post.user_ids should return an array of integers (assuming post has_many users), so trying to call on that methods you've presumably defined on User doesn't make any sense
Fred > -- > 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.

