attribute_method_affix

attribute_method_affix(*affixes) Instance Public methods Declares a method available for all attributes with the given prefix and suffix. Uses method_missing and respond_to? to rewrite the method. #{prefix}#{attr}#{suffix}(*args, &block) to #{prefix}attribute#{suffix}(#{attr}, *args, &block) An #{prefix}attribute#{suffix} instance method must exist and accept at least the attr argument. class Person include ActiveModel::AttributeMethods attr_accessor :name attribut

attribute_alias?

attribute_alias?(new_name) Instance Public methods Is new_name an alias?

attribute_alias

attribute_alias(name) Instance Public methods Returns the original name for the alias name

alias_attribute

alias_attribute(new_name, old_name) Instance Public methods Allows you to make aliases for attributes. class Person include ActiveModel::AttributeMethods attr_accessor :name attribute_method_suffix '_short?' define_attribute_methods :name alias_attribute :nickname, :name private def attribute_short?(attr) send(attr).length < 5 end end person = Person.new person.name = 'Bob' person.name # => "Bob" person.nickname # => "Bob" person.

version

version() Class Public methods Returns the version of the currently loaded ActionView as a Gem::Version

gem_version

gem_version() Class Public methods Returns the version of the currently loaded ActionView as a Gem::Version

eager_load!

eager_load!() Class Public methods

prepend_view_path

prepend_view_path(path) Instance Public methods

lookup_context

lookup_context() Instance Public methods LookupContext is the object responsible to hold all information required to lookup templates, i.e. view paths and details. Check ActionView::LookupContext for more information.

details_for_lookup

details_for_lookup() Instance Public methods