Apidock.com
#12

APIdock: Front page

Flowdock. Choose a project. Rspec_icon_80. RSpec. Behaviour Driven Development framework for Ruby. 6 imported versions - 23 notes - Browse - Search ...

Link: apidock.com

  • presence (Object)

    apidock.com 09 Mar '15, 3pm

    Returns the receiver if it’s present otherwise returns nil . object.presence is equivalent to object . present? ? object : nil For example, something like state = params [ :state ] if params [ :state ]. present? country = params [ :country ] if params [ :country ]. present? region = s...

  • select (ActiveRecord::QueryMethods)

    apidock.com 09 Mar '15, 10pm

    First: takes a block so it can be used just like Array#select. Model . all . select { | m | m . field == value } This will build an array of objects from the database for the scope, converting them into an array and iterating through them using Array#select. Second: Modifies the SELEC...

  • composed_of (ActiveRecord::Aggregations::ClassMethods)

    apidock.com 21 Jan '15, 9am

    :class_name - Specifies the class name of the association. Use it only if that name can’t be inferred from the part id. So composed_of :address will by default be linked to the Address class, but if the real class name is CompanyAddress, you’ll have to specify it with this option. :ma...

  • changed_for_autosave? (ActiveRecord::AutosaveAssociation)

    apidock.com 25 Dec '14, 2am

    Returns whether or not this record has been changed in any way (including whether any of its nested autosave associations are likewise changed) Show source # File activerecord/lib/active_record/autosave_association.rb, line 253 def changed_for_autosave? new_record? || changed? || mark...

  • fetch (Hash)

    apidock.com 08 Jan '15, 2am

    can’t be found, there are several options: With no other arguments, it will raise an KeyError exception; if default is given, then that will be returned; if the optional code block is specified, then that will be run and its result returned.

  • klass (ActiveRecord::Reflection::AssociationReflection)

    apidock.com 22 Jan '15, 1pm

    Returns the target association’s class. class Author < ActiveRecord :: Base has_many :books end Author . reflect_on_association ( :books ). klass # => Book Note: Do not call klass .new or klass .create to instantiate a new association object. Use build_association or create_associatio...

  • serialize (ActiveRecord::Base)

    apidock.com 25 Oct '14, 10pm

    If you have an attribute that needs to be saved to the database as an object, and retrieved as the same object, then specify the name of that attribute using this method and it will be handled automatically. The serialization is done through YAML . If class_name is specified, the seri...

  • forty_two (ActiveSupport::CoreExtensions::Array::Access)

    apidock.com 08 Jan '15, 1pm

    This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here. These similar methods exist in v4.1.8: Array#forty_two ActiveRecord::Associations::CollectionAssociation#forty_two ActiveRecord::Associations::CollectionProxy#forty_two A...

Related

api.rubyonrails.org
Ruby on Rails API
ruby-doc.org
Ruby-Doc.org: Documenting the Ruby Language
rubydoc.info
RubyDoc.info - Library Listing
railscasts.com
RailsCasts: Ruby on Rails Screencasts
rubyinside.com
Ruby Inside: The Ruby Blog
railsbrain.com
Parasite Control with the MMS Miracle Mineral Supplement