I'm following this tutorial http://www.padrinorb.com/guides/blog-tutorial and get a undefined method email for nil:NilClass
error after assigning a user to all existing posts.
Am I missing something? Possibly the tutorial is out of date with the newest version of Padrino?
Do I need to add some sort of association in models/account.rb ?
UPDATE & SOLUTION
Make sure to have the post.rb model in the main folder of the app structure. I had it under app/models.
#app/models/post.rb
class Post < ActiveRecord::Base
belongs_to :account
validates_presence_of :title
validates_presence_of :body
end
then
$ padrino rake ar:migrate:redo