Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

f.action :cancel, :as => :button doesn't work as expected #890

Closed
mdorfin opened this Issue Oct 17, 2012 · 2 comments

Comments

Projects
None yet
2 participants

mdorfin commented Oct 17, 2012

I get Formtastic::UnsupportedMethodForAction with this code:

30: 
31:     = f.actions do
32:       = f.action :cancel, :as => :button 
33: 

I thought it generates a button.

Owner

justinfrench commented Oct 23, 2012

:cancel is only available as a link, because it needs to be a href/link that goes somewhere. You could probably create your own custom action that incorporates some onclick JS though — how important is it that this is a button? Can you just style it to look like a button?

mdorfin commented Oct 23, 2012

Yes sure. Thanks for the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment