hello_in_a_string

hello_in_a_string() Instance Public methods

rename_index

rename_index(index_name, new_index_name) Instance Public methods Renames the given index on the table. t.rename_index(:user_id, :account_id)

primary_keys

primary_keys(table_name) Instance Public methods

template_exists?

template_exists?(name, prefixes = [], partial = false, keys = [], options = {}) Instance Public methods Alias for: exists?

new

new(initial_variable_values = {}, &block) Class Public methods

save!

save!(*) Instance Public methods Saves the model. If the model is new a record gets created in the database, otherwise the existing record gets updated. With save! validations always run. If any of them fail ActiveRecord::RecordInvalid gets raised. See ActiveRecord::Validations for more information. There's a series of callbacks associated with save!. If any of the before_* callbacks return false the action is cancelled and save! raises ActiveRecord::RecordNotSaved. See ActiveRecor

minus_without_coercion

minus_without_coercion(other) Instance Public methods Alias for: -

fresh?

fresh?(response) Instance Public methods Check response freshness (Last-Modified and ETag) against request If-Modified-Since and If-None-Match conditions. If both headers are supplied, both must match, or the request is not considered fresh.

lookup_ancestors

lookup_ancestors() Instance Public methods When localizing a string, it goes through the lookup returned by this method, which is used in ActiveModel::Name#human, ActiveModel::Errors#full_messages and #human_attribute_name.

attribute_names

attribute_names() Instance Public methods Returns an array of names for the attributes available on this object. class Person < ActiveRecord::Base end person = Person.new person.attribute_names # => ["id", "created_at", "updated_at", "name", "age"]