run_in_isolation

run_in_isolation(&blk) Instance Public methods

new

new(controller) Class Public methods

minus_with_coercion

minus_with_coercion(other) Instance Public methods Time#- can also be used to determine the number of seconds between two Time instances. We're layering on additional behavior so that ActiveSupport::TimeWithZone instances are coerced into values that Time#- will recognize -

new

new() Class Public methods

message

message() Instance Public methods Access the message instance.

undefine_attribute_methods

undefine_attribute_methods() Instance Public methods Removes all the previously dynamically defined methods from the class. class Person include ActiveModel::AttributeMethods attr_accessor :name attribute_method_suffix '_short?' define_attribute_method :name private def attribute_short?(attr) send(attr).length < 5 end end person = Person.new person.name = 'Bob' person.name_short? # => true Person.undefine_attribute_methods person.name_short? # => No

wrap_with_namespace

wrap_with_namespace(content) Instance Protected methods

release_savepoint

release_savepoint(name = nil) Instance Public methods

double_redirect

double_redirect() Instance Public methods

time_tag

time_tag(date_or_time, *args, &block) Instance Public methods Returns an html time tag for the given date or time. time_tag Date.today # => <time datetime="2010-11-04">November 04, 2010</time> time_tag Time.now # => <time datetime="2010-11-04T17:55:45+01:00">November 04, 2010 17:55</time> time_tag Date.yesterday, 'Yesterday' # => <time datetime="2010-11-03">Yesterday</time> time_tag Date.today, pubdate: true # => <t