define_method_attribute=

define_method_attribute=(attr_name) Instance Protected methods Defined for all datetime and timestamp attributes when time_zone_aware_attributes are enabled. This enhanced write method will automatically convert the time passed to it to the zone stored in Time.zone.

encode_credentials

encode_credentials(http_method, credentials, password, password_is_ha1) Instance Public methods

no_touching

no_touching(&block) Instance Public methods Lets you selectively disable calls to `touch` for the duration of a block. Examples ActiveRecord::Base.no_touching do Project.first.touch # does nothing Message.first.touch # does nothing end Project.no_touching do Project.first.touch # does nothing Message.first.touch # works, but does not touch the associated project end

last_week

last_week(start_day = Date.beginning_of_week) Instance Public methods Alias for: prev_week

type_cast

type_cast(value) Instance Public methods

params

params() Instance Public methods Alias for: parameters

host

host() Instance Public methods The hostname used in the last request.

assert_redirected_to

assert_redirected_to(options = {}, message=nil) Instance Public methods Assert that the redirection options passed in match those of the redirect called in the latest action. This match can be partial, such that assert_redirected_to(controller: "weblog") will also match the redirection of redirect_to(controller: "weblog", action: "show") and so on. # assert that the redirection was to the "index" action on the WeblogController assert_redirected_to controller: "weblog", action: "ind

foreign_key

foreign_key(class_name, separate_class_name_and_id_with_underscore = true) Instance Public methods Creates a foreign key name from a class name. separate_class_name_and_id_with_underscore sets whether the method should put '_' between the name and 'id'. 'Message'.foreign_key # => "message_id" 'Message'.foreign_key(false) # => "messageid" 'Admin::Post'.foreign_key # => "post_id"

acts_like_date?

acts_like_date?() Instance Public methods Duck-types as a Date-like class. See Object#acts_like?.