Answer the question
In order to leave comments, you need to log in
How in Rails in CRUD-e in the form to change the text of the button to "save" if edit?
There is a default form _form - for adding and editing.
By default, the button text is 'submit', what is the condition to set to find out if it is create or edit?
Answer the question
In order to leave comments, you need to log in
If the form is for a model object, then you can rely on the "new_record?"
Put the text "Save" or "Save" and do not suffer with such a trifle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question