count_by_sql

count_by_sql(sql) Instance Public methods Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. The use of this method should be restricted to complicated SQL queries that can't be executed using the ActiveRecord::Calculations class methods. Look into those before using this. Parameters sql - An SQL statement which should return a count query from the database, see the example below. Product.count_by_sql âSELECT COUNT(*) FROM sales s, cust

inherited

inherited(base) Class Public methods

require

require(key) Instance Public methods Ensures that a parameter is present. If it's present, returns the parameter at the given key, otherwise raises an ActionController::ParameterMissing error. ActionController::Parameters.new(person: { name: 'Francesco' }).require(:person) # => {"name"=>"Francesco"} ActionController::Parameters.new(person: nil).require(:person) # => ActionController::ParameterMissing: param not found: person ActionController::Parameters.new(person: {}).r

hello_world

hello_world() Instance Public methods

compare_with_coercion

compare_with_coercion(other) Instance Public methods Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. <=>

reload_routes!

reload_routes!() Instance Public methods Reload application routes regardless if they changed or not.

nth_child

nth_child(a, b, of_type, reverse) Instance Protected methods Returns a lambda that can match an element against the nth-child pseudo class, given the following arguments: a â Value of a part. b â Value of b part. of_type â True to test only elements of this type (of-type). reverse â True to count in reverse order (last-).

new

new(old_const, new_const, deprecator = ActiveSupport::Deprecation.instance) Class Public methods

write

write(key, value) Instance Public methods

initialize_internals_callback

initialize_internals_callback() Instance Public methods