Formtastic::UnknownActionError #871

Closed
diangy opened this Issue Jul 19, 2012 · 1 comment

Projects

None yet

2 participants

@diangy

I am getting a Formtastic::UnknownActionError whenever I use this code:

= f.actions :save, :submit

or even

= f.actions do
  = f.action :save
  = f.action :submit

However my I18n file has those actions:

en:
  hello: "Hello world"
  formtastic:
    actions:
      save: "Save & Return Later"
      submit: "Submit to CTSI for review"

The former f.buttons format worked perfectly.

@justinfrench

Hi, the valid actions are submit, cancel and reset. These are what you should use in the form to avoid this error. Und the hood, submit uses both the submit (fallback), save (edits) and create (new records) i18n keys.

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