New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rolify doesn't work inside engines #238
Comments
you can use this repo https://github.com/mido18/rolify this problem fixed in it. |
Is this still not merged? |
@Svashta i think its still not merged |
@mido18 What PR is it? Can you link to it and is it working against the current codebase? |
I am the same problem here. @mido18 what is causing this problem and what was the fix? |
@mido18 there is no open or closed PR from you here, could you try creating one against the current repo head? |
@wldcordeiro Sorry what is PR ? also i don't know if it's working on the current codebase |
A PR is a pull request, your fix is over a hundred commits behind the Rolify upstream. I could take a look and see if it works with our current code base but if you could pull down changes from upstream and create a pull request it'd help a lot. |
@wldcordeiro okay i will try to do it :) |
Hmm it actually looks like I've already integrated your changes into the project at some point but the issue is still present. |
@wldcordeiro i think you must pass "engine" and "devise" as args when you use |
@wldcordeiro
First, create your Role model and migration file using this generator: rails g rolify Role User rails g rolify Role User engine rails g rolify Role User engine devise |
Ah, I see. That needs to be added to the docs somewhere. 😄 I'll figure that out and add that. |
@samuelralak the solution has been posted if you're on the newest version of Rolify. |
@wldcordeiro Cool 👍 |
@wldcordeiro: can you please point out the commit or the wiki page regarding that issue in order to close it? |
Just wanted to let people know that
|
Added Engine configuration steps in wiki, thanks! |
I have devise setup inside of my engine, however, the Rolify generates do not work inside the engine.
rails g rolify Role User
error: "uninitialized constant User"
So I then just created the necessary files without the generator. I would then get an error on rake db:migrate stating "uninitialized constant Role".
So I put: require 'rolify'
inside of my engine.rb file.
Still nothing. What's wrong?
The text was updated successfully, but these errors were encountered: