I have a rails password like so in my devise.rb
:
config.password_length = 8..128
I would like to set this to
if development?
config.password_length = 1..128
else
config.password_length = 8..128
end
But this gives me this error:
NoMethodError: undefined method
development?' for main:Object`
I believe you want something more like:
if Rails.env.development?
config.password_length = 1..128
else
config.password_length = 8..128
end