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
Password field inputs are shown as regular inputs in Active Admin #1187
Comments
@arogachev does this happen for all the fields or just devise ? |
@mikz Thanks for fast reply. If i write something like this inside resource page: form multipart: true do |f|
f.inputs do
f.input :password, as: :password
end
end input is shown correctly. I can't fully understand magic behind: f.input :password, label: t('active_admin.devise.password.title') Here the type is not explicitly specified, so password is rendered by name |
So the change that broke this is jtomaszewski@9e9fcd5 |
@arogachev could you either provide sample project, or try to debug the code in question? I see that it [should return Also, I pushed an experimental branch enabling the new Attribute API #1188. And last, but not least. Pushed example app https://github.com/mikz/rails-5-formtastic-example that works for me. User password and password_digest correctly show as password input. |
@arogachev I can't reproduce this with rails 5. So I'd probably blame Devise for doing something bad. |
@mikz So if attribute name is password and type is not explicitly specified, Forttastic guesses that it has password type, right? |
@arogachev yes, it matches the method name for |
@mikz I just tested, in separate resource page this works fine: form multipart: true do |f|
f.inputs do
f.input :password
end
end So turns out this is Devise problem, I left the comment here heartcombo/devise#3880. |
@arogachev thanks ! Closing this then. Reopen it if something is needed from formtastic. |
Initially I described problem here activeadmin/activeadmin#4280 and thought that it was Active Admin problem.
I'm using Rails
5.0.0.beta1
, MyGemfile
contents:I tried to update to latest commit of Formtastic on master branch, that didn't help:
For example, this line from this file:
generates the following HTML:
So there is no
type="password"
.The text was updated successfully, but these errors were encountered: