class ActionView::Helpers::FormBuilder

def button(value = nil, options = {}, &block)


#
# Ask me!
# =>
button("Create a post")
==== Examples

create: "Add %{model}"
post:
submit:
helpers:
en:

It also searches for a key specific for the given object:

update: "Confirm changes to %{model}"
create: "Create a %{model}"
submit:
helpers:
en:

(the same as submit helper) and accept the %{model} as translation interpolation:
Those labels can be customized using I18n, under the helpers.submit key

button label, otherwise, it uses "Update Post".
In the example above, if @post is a new record, it will use "Create Post" as

<% end %>
<%= f.button %>
<%= form_for @post do |f| %>

if the object is a new resource or not to create the proper label:
Add the submit button for the given form. When no value is given, it checks
def button(value = nil, options = {}, &block)
  value, options = nil, value if value.is_a?(Hash)
  value ||= submit_default_value
  @template.button_tag(value, options, &block)
end