Ruby on Rails API

Official API of the framework. Provides an explanation of every class and functionality.

Link: api.rubyonrails.org

  • ActiveRecord::Associations::ClassMethods

    api.rubyonrails.org 17 Apr '14, 7pm

    Specifies a many-to-many relationship with another class. This associates two classes via an intermediate join table. Unless the join table is explicitly specified as an option, it is guessed using the lexical order of the class names. So a join between Developer and Project will give...

  • mapper.rb

    api.rubyonrails.org 17 Apr '14, 3am

    active_support/core_ext/hash/except active_support/core_ext/hash/reverse_merge active_support/core_ext/hash/slice active_support/core_ext/enumerable active_support/core_ext/array/extract_options active_support/core_ext/module/remove_method active_support/inflector action_dispatch/rout...

  • Array

    api.rubyonrails.org 15 Apr '14, 5am

    Converts the array to a comma-separated sentence where the last element is joined by the connector word. You can pass the following options to change the default behavior. If you pass an option key that doesn't exist in the list below, it will raise an ArgumentError . Options :words_c...

  • ActiveRecord::Associations::CollectionProxy

    api.rubyonrails.org 14 Apr '14, 10pm

    Destroys the records supplied and removes them from the collection. This method will always remove record from the database ignoring the :dependent option. Returns an array with the removed records. class Person < ActiveRecord::Base has_many :pets end person.pets.size # => 3 person.pe...

  • ActionView::Helpers::JavaScriptHelper

    api.rubyonrails.org 13 Apr '14, 1pm

    Escapes carriage returns and single and double quotes for JavaScript segments. Also available through the alias j(). This is particularly helpful in JavaScript responses, like: $('some_element').replaceWith('<%=j render 'some/element_template' %>');

  • ActionView::Helpers::FormTagHelper

    api.rubyonrails.org 11 Apr '14, 4am

    select_tag "people", options_from_collection_for_select(@people, "id", "name") # <select id="people" name="people"><option value="1">David</option></select> select_tag "people", "<option>David</option>".html_safe # => <select id="people" name="people"><option>David</option></select> s...

  • ActiveRecord::Persistence

    api.rubyonrails.org 10 Apr '14, 6pm

    Returns an instance of the specified klass with the attributes of the current record. This is mostly useful in relation to single-table inheritance structures where you want a subclass to appear as the superclass. This can be used along with record identification in Action Pack to all...

  • ActionView::Helpers::DateHelper

    api.rubyonrails.org 10 Apr '14, 2pm

    # Generates a date select that when POSTed is stored in the article variable, in the written_on attribute. date_select("article", "written_on") # Generates a date select that when POSTed is stored in the article variable, in the written_on attribute, # with the year in the year drop d...


APIdock: Front page
RailsCasts: Ruby on Rails Screencasts
Ruby-Doc.org: Documenting the Ruby Language
File: README — Documentation by YARD 0.8.4
MailChimp | API Docs
jQuery API
Ruby Inside: The Ruby Blog