On 18 March 2010 13:43, ES <[email protected]> wrote: > the first time I load the page, the correct form displays but then > when I click submit, I get this error : > > You have a nil object when you didn't expect it! > You might have expected an instance of ActiveRecord::Base. > The error occurred while evaluating nil.[] > > why would it get a nil object when I submit the form (after working > the first time) and why is it trying to load the same page after > submitting?
When you click submit, you're probably going through the "create" method (unless you've set the form to go somewhere else)... does the @columns['thing_general'] value get populated there (you've shown the code for the "new" method, but not "create")? -- 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.

