Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1c442f775c
Fetching contributors…

Cannot retrieve contributors at this time

file 28 lines (13 sloc) 0.597 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
== Rails 3.1rc4 + devise + Single table inheritance = fail

This app demonstrats the issue I'm having with devise and single table inheritance:

I have two devise_for : admins and users

the Admin model inherits from User model.

When trying to access resources accessible only for admins (@see posts_controller#index), I get redirected to admins/signin although an admin is signed in.




== Install

1. git clone

2. rvm use 1.9.2p180@devise_sti_issue --create

3. bundle install

4. rake db:migrate

5. rake db:test:prepare

6. rspec spec/controllers/posts_controller_spec.rb

7. see test fail
Something went wrong with that request. Please try again.