Comments (13)
Sorry to say but option(1) didn't work for me and although option(2) worked but now the command rake casein:users:create_admin email=[email protected] gives another error
[Casein] Failed: check that the 'admin' account doesn't already exist.
while there is no any users in DB yet.
from casein3.
Hey there,
You need to change the value of whitelist_attributes in application.rb to 'false', instead of the default 'true'
config.active_record.whitelist_attributes = false
This should get the current version of Casein working with Rails 3.2.3, but note that the whitelist will now be disabled for all models (see http://guides.rubyonrails.org/security.html#mass-assignment)
from casein3.
Thanks russel....it worked.. :)
from casein3.
Thanks Russel For Giving the correct and exact information, Thank you.
from casein3.
This is fixed in Casein 4.x
https://github.com/russellquinn/casein
from casein3.
When I added Casein to an existing project, I did get this error. I actually had to add the entire code line because it did not exist in the project at all: config.active_record.whitelist_attributes = false. The info you provided fixed the problem! Thanks Russel!
from casein3.
Are you using Casein 4.x?
from casein3.
I apologize for the delay.
I am using gem 'casein', '~>5.0.0'
I hope that helps!
from casein3.
If you use the scaffolding generator, then this will automatically create a list of allowable parameters in the controller, so you don't need to just whitelist everything.
from casein3.
The scaffold generated from Casein looks good. It is when I tried to generate an admin that did not work until I added the whitelist in the project's development.rb with the rest of the config statements. I think it is because it was an existing project and is ultimately setup differently. When I use Casein as a new rails app, I did not have the problem.
from casein3.
rake casein:users:create_admin email=[email protected] password="ssddaa"
[Casein] Failed: check that the 'admin' account doesn't already exist.
Casein5.1.1 rails4.2.4
from casein3.
This is the wrong project for Casein 5.x tickets.
Latest Casein:
https://github.com/russellquinn/casein
from casein3.
Also, I can confirm that creating an admin user works with Casein 5.1.1 and Rails 4.2.4. Are you sure the 'admin' account doesn't already exist?
from casein3.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from casein3.