scoping

scoping() Instance Public methods Scope all queries to the current scope. Comment.where(post_id: 1).scoping do Comment.first end # => SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 ORDER BY "comments"."id" ASC LIMIT 1 Please check unscoped if you want to remove all previous scopes (including the default_scope) during the execution of a block.

escape_once

escape_once(html) Instance Public methods Returns an escaped version of html without affecting existing escaped entities. escape_once("1 < 2 &amp; 3") # => "1 &lt; 2 &amp; 3" escape_once("&lt;&lt; Accept & Checkout") # => "&lt;&lt; Accept &amp; Checkout"

strict_mode?

strict_mode?() Instance Public methods

bundler?

bundler?() Instance Public methods This is a predicate useful for the doc:guides task of applications.

validates_format_of

validates_format_of(*attr_names) Instance Public methods Validates whether the value of the specified attribute is of the correct form, going by the regular expression provided.You can require that the attribute matches the regular expression: class Person < ActiveRecord::Base validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :create end Alternatively, you can require that the specified attribute does not match the regular expression: class

fullpath

fullpath() Instance Public methods Returns the String full path including params of the last URL requested. # get "/articles" request.fullpath # => "/articles" # get "/articles?page=2" request.fullpath # => "/articles?page=2"

test_quote_string_int_column

test_quote_string_int_column() Instance Public methods

noon

noon() Instance Public methods Alias for: middle_of_day

descends_from_active_record?

descends_from_active_record?() Instance Public methods Returns true if this does not need STI type condition. Returns false if STI type condition needs to be applied.

eager_load!

eager_load!() Class Public methods