translate_exception

translate_exception(exception, message) Instance Protected methods

submit

submit(value=nil, options={}) Instance Public methods Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label: <%= form_for @post do |f| %> <%= f.submit %> <% end %> In the example above, if @post is a new record, it will use âCreate Postâ as submit button label, otherwise, it uses âUpdate Postâ. Those labels can be customized using I18n, under the helpers.submit key and accept

to_str

to_str() Instance Public methods Equivalent to to_s.

+

+(other) Instance Public methods

define_model_callbacks

define_model_callbacks(*callbacks) Instance Public methods #define_model_callbacks accepts the same options define_callbacks does, in case you want to overwrite a default. Besides that, it also accepts an :only option, where you can choose if you want all types (before, around or after) or just some. define_model_callbacks :initializer, only: :after Note, the only: <type> hash will apply to all callbacks defined on that method call. To get around this you can call the #defin

render_file_as_string_with_instance_variables

render_file_as_string_with_instance_variables() Instance Public methods :ported:

indent!

indent!(amount, indent_string=nil, indent_empty_lines=false) Instance Public methods Same as indent, except it indents the receiver in-place. Returns the indented string, or nil if there was nothing to indent.

with_name

with_name() Class Public methods

if_none_match_etags

if_none_match_etags() Instance Public methods

to_i

to_i() Instance Public methods Converts self to an integer number of seconds since the Unix epoch.