Thanks for pointing me to @pets = admin.pets.all but now I'm getting the 
error

    ActiveRecord::StatementInvalid in PetsController#index

    SQLite3::SQLException: no such column: pets.admin_id: SELECT 
"pets".* FROM "pets" WHERE ("pets".admin_id = 1)

    Rails.root: /home/heptagone/dev/app2/devise_example
    Application Trace | Framework Trace | Full Trace

    app/controllers/pets_controller.rb:7:in `index'


I have already done the command "bundle exec rake:db migrate" so I'd 
thing that admin_id would already part of pets as you can see my models 
in my original post

-- 
Posted via http://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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to