configure

configure(&block) Class Public methods Allows you to configure the railtie. This is the same method seen in Railtie::Configurable, but this module is no longer required for all subclasses of Railtie so we provide the class method here.

type

type() Instance Public methods

render_file_as_string_with_locals

render_file_as_string_with_locals() Instance Public methods

middleware

middleware() Class Public methods Alias for middleware_stack.

to_formatted_s

to_formatted_s(format = :default) Instance Public methods Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. This method is aliased to to_s. Examples datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" datetime.to_s(:db) # => "2007-12-04 00:00:00" datetime.to_s(:number) # => "20071204000000" datetime.t

eql_with_coercion

eql_with_coercion(other) Instance Public methods Layers additional behavior on #eql? so that ActiveSupport::TimeWithZone instances can be eql? to an equivalent Time eql?

helper

helper() Instance Public methods Gets the helper methods available to the controller. This method assumes an ApplicationController exists, and it extends ActionController::Base

validates_absence_of

validates_absence_of(*attr_names) Instance Public methods Validates that the specified attributes are blank (as defined by Object#blank?). Happens by default on save. class Person < ActiveRecord::Base validates_absence_of :first_name end The first_name attribute must be in the object and it must be blank. Configuration options: :message - A custom error message (default is: âmust be blankâ). There is also a list of default options supported by every validator: :if, :unless

to_formatted_s

to_formatted_s(format = :default) Instance Public methods Converts to a formatted string. See DATE_FORMATS for builtin formats. This method is aliased to to_s. time = Time.now # => Thu Jan 18 06:10:17 CST 2007 time.to_formatted_s(:time) # => "06:10" time.to_s(:time) # => "06:10" time.to_formatted_s(:db) # => "2007-01-18 06:10:17" time.to_formatted_s(:number) # => "20070118061017" time.to_formatted_s(:shor

normalize

normalize(string, form=nil) Instance Public methods Returns the KC normalization of the string by default. NFKC is considered the best normalization form for passing strings to databases and validations. string - The string to perform normalization on. form - The form you want to normalize in. Should be one of the following: :c, :kc, :d, or :kd. Default is ActiveSupport::Multibyte.default_normalization_form.