active_threadsafe?

active_threadsafe?() Instance Public methods

set_callback

set_callback(name, *filter_list, &block) Instance Public methods Install a callback for the given event. set_callback :save, :before, :before_meth set_callback :save, :after, :after_meth, if: :condition set_callback :save, :around, ->(r, &block) { stuff; result = block.call; stuff } The second arguments indicates whether the callback is to be run :before, :after, or :around the event. If omitted, :before is assumed. This means the first example above can also be writte

new

new(count = 1) Class Public methods

updated?

updated?() Instance Public methods Check if any of the entries were updated. If so, the watched and/or updated_at values are cached until the block is executed via execute or execute_if_updated.

render_implicit_html_template_from_xhr_request

render_implicit_html_template_from_xhr_request() Instance Public methods

only

only(*onlies) Instance Public methods Removes any condition from the query other than the one(s) specified in onlies. Post.order('id asc').only(:where) # discards the order condition Post.order('id asc').only(:where, :order) # uses the specified order

decrement

decrement(name, amount = 1, options = nil) Instance Public methods

initializer

initializer(name, opts={}, &block) Instance Public methods Sends the initializers to the initializer method defined in the Rails::Initializable module. Each Rails::Application class has its own set of initializers, as defined by the Initializable module.

all_week

all_week(start_day = Date.beginning_of_week) Instance Public methods Returns a Range representing the whole week of the current date/time. Week starts on start_day, default is Date.week_start or config.week_start when set.

new

new(app, options={}) Class Public methods