marshal_dump

marshal_dump() Instance Public methods

before_validation

before_validation(*args, &block) Instance Public methods Defines a callback that will get called right before validation happens. class Person include ActiveModel::Validations include ActiveModel::Validations::Callbacks attr_accessor :name validates_length_of :name, maximum: 6 before_validation :remove_whitespaces private def remove_whitespaces name.strip! end end person = Person.new person.name = ' bob ' person.valid? # => true person.name # =&

flush_next_in

flush_next_out â Stringflush_next_out { |chunk| ... } â nil Instance Public methods Flushes output buffer and returns all data in that buffer. If a block is given each chunk is yielded to the block until the current output buffer has been flushed.

clear

clear() Class Public methods

synthesize_file_task

synthesize_file_task(task_name) Instance Public methods

|

|(tag) Instance Public methods

windows?

windows?() Instance Public methods

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

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

listener=

listener=(listener) Instance Public methods