reject

reject(*args, &block) Instance Public methods

enum

enum(definitions) Instance Public methods

index

index(column_name, options = {}) Instance Public methods Adds index options to the indexes hash, keyed by column name This is primarily used to track indexes that need to be created after the table index(:account_id, name: 'index_projects_on_account_id')

method

method() Instance Public methods Returns the original value of the environment's REQUEST_METHOD, even if it was overridden by middleware. See request_method for more information.

default_hsts_options

default_hsts_options() Class Public methods

in_time_zone

in_time_zone(new_zone = ::Time.zone) Instance Public methods Returns the simultaneous time in Time.zone, or the specified zone.

atom_feed

atom_feed(options = {}, &block) Instance Public methods Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other template languages). Full usage example: config/routes.rb: Rails.application.routes.draw do resources :posts root to: "posts#index" end app/controllers/posts_controller.rb: class PostsController < ApplicationController::Base # GET /posts.html # GET /posts.atom def index @post

logger

logger() Instance Public methods

concern

concern(topic, &module_definition) Instance Public methods A low-cruft shortcut to define a concern. concern :EventTracking do ... end is equivalent to module EventTracking extend ActiveSupport::Concern ... end

update_counters

update_counters(id, counters) Instance Public methods A generic âcounter updaterâ implementation, intended primarily to be used by #increment_counter and #decrement_counter, but which may also be useful on its own. It simply does a direct SQL update for the record with the given ID, altering the given hash of counters by the amount given by the corresponding value: Parameters id - The id of the object you wish to update a counter on or an Array of ids. counters - A Hash containi