any?

any?(&block) Instance Public methods Returns true if the collection is not empty. class Person < ActiveRecord::Base has_many :pets end person.pets.count # => 0 person.pets.any? # => false person.pets << Pet.new(name: 'Snoop') person.pets.count # => 0 person.pets.any? # => true You can also pass a block to define criteria. The behavior is the same, it returns true if the collection based on the criteria is not empty. person.pets # => [#<Pet name

parents

parents() Instance Public methods Returns all the parents of this module according to its name, ordered from nested outwards. The receiver is not contained within the result. module M module N end end X = M::N M.parents # => [Object] M::N.parents # => [M, Object] X.parents # => [M, Object]

all

all(klass) Class Public methods GET index

duplicable?

duplicable?() Instance Public methods nil is not duplicable: nil.duplicable? # => false nil.dup # => TypeError: can't dup NilClass

inspect

inspect() Instance Public methods

j

j(javascript) Instance Public methods Alias for: escape_javascript

action_methods

action_methods() Instance Public methods Overrides AbstractController::Base#action_methods to remove any methods that are listed as hidden methods.

tags_attributes=

tags_attributes=(attributes) Instance Public methods

beginning_of_week

beginning_of_week(start_day = Date.beginning_of_week) Instance Public methods Returns a new date/time representing the start of this week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 0:00. at_beginning_of_week

formatted_offset

formatted_offset(colon = true, alternate_utc_string = nil) Instance Public methods Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC. Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" Time.zone.now.formatted_offset(true) # => "-05:00" Time.zone.now.formatted_offset(false) # => "-0500" Time.zone = 'UTC' # => "UTC" Time.zone.now.formatted_offset