synthesize_file_task

synthesize_file_task(task_name) Instance Public methods

|

|(tag) Instance Public methods

windows?

windows?() Instance Public methods

hidden_field

hidden_field(object_name, method, options = {}) Instance Public methods Returns a hidden input tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown. Examples hidden_field(:signup, :pass_confirm) # => <input type="hidden" id="sign

respond_to

respond_to(*mimes) Instance Public methods Defines mime types that are rendered by default when invoking respond_with. respond_to :html, :xml, :json Specifies that all actions in the controller respond to requests for :html, :xml and :json. To specify on per-action basis, use :only and :except with an array of actions or a single action: respond_to :html respond_to :xml, :json, except: [ :edit ] This specifies that all actions respond to :html and all actions except :edit respond

listener=

listener=(listener) Instance Public methods

call

call(env) Instance Public methods

datetime_local_field

datetime_local_field(object_name, method, options = {}) Instance Public methods Returns a #text_field of type âdatetime-localâ. datetime_local_field("user", "born_on") # => <input id="user_born_on" name="user[born_on]" type="datetime-local" /> The default value is generated by trying to call strftime with â%Y-%m-%dT%Tâ on the object's value, which makes it behave as expected for instances of DateTime and ActiveSupport::TimeWithZone. @user.born_on = Date.new(1984, 1, 12) d

attribute_for_inspect

attribute_for_inspect(attr_name) Instance Public methods Returns an #inspect-like string for the value of the attribute attr_name. String attributes are truncated upto 50 characters, Date and Time attributes are returned in the :db format, Array attributes are truncated upto 10 values. Other attributes return the value of #inspect without modification. person = Person.create!(name: 'David Heinemeier Hansson ' * 3) person.attribute_for_inspect(:name) # => "\"David Heinemeier Han

insert

insert(index, *args, &block) Instance Public methods Also aliased as: insert_before