ruby on rails 4 - Deprecation warning when using `rake db:seed` -


i'm having deprecation warning when using rake db:seed

this dynamic method deprecated. 

this happens on user.add_role :admin of block below:

user = user.find_or_create_by(email: env['admin_email'].dup) |u|    u.password = env['admin_password'].dup   u.password_confirmation = env['admin_password'].dup end puts 'user: ' << user.email user.add_role :admin user.skip_confirmation! user.save! 

i have cleaned code find_or_create_by_email warning, cannot find answer add_role.

it due version of rolify. it's been fixed 3.2 me cf


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -