Closed hopewise closed 10 years ago
If you already have devise working in your app and you want to use your existing User model to work with Alchemy, you don't need to require the alchemy-devise gem because it brings you a new user model with migrations.
To tell Alchemy to use your User model, you need to create an initializer as described here: https://github.com/magiclabs/alchemy_cms#authentication-user-model
If you notice any issues feel free to file a report here or ask in the google user group. You also should have a look into the User class of the alchemy-devise gem: https://github.com/magiclabs/alchemy-devise/blob/master/app/models/alchemy/user.rb
Thanks
A good documentation on how to add your user model can be found here: https://github.com/magiclabs/alchemy_cms/blob/master/lib/alchemy/auth_accessors.rb#L1-L30
Thanks very much, I will work on it and see ..
I guess we can close this? Fell free to open another issue, if you still can't get it working.
As I have upgraded my rails 3.2/ devise app to rails 4.03, I have installed alchemy-cms 3.0 & alchemy-devise, I get this error when try to sign in:
ActiveModel::MassAssignmentSecurity::Error in Devise::SessionsController#create Can't mass-assign protected attributes for Alchemy::User: password
Can you please tell me how to solve this problem?
Edit:
I think that the problem is that I am not extending User at your gem? Currently my User model extends ActiveRecord::Base like:
So, what shall it be?
Edit:
My pre-existing project has already devise installed and working, I installed Alchemy-CMS, but my User is already set and has custom methods at my app, how can I integrate my app User into this gem User?