eager_load!

eager_load!() Class Public methods

route_key

route_key(record_or_class) Class Public methods Returns string to use while generating route names. It differs for namespaced models regarding whether it's inside isolated engine. # For isolated engine: ActiveModel::Naming.route_key(Blog::Post) # => "posts" # For shared engine: ActiveModel::Naming.route_key(Blog::Post) # => "blog_posts" The route key also considers if the noun is uncountable and, in such cases, automatically appends _index.

set_environment!

set_environment!() Instance Public methods

from

from(position) Instance Public methods Returns a substring from the given position to the end of the string. If the position is negative, it is counted from the end of the string. str = "hello" str.from(0) # => "hello" str.from(3) # => "lo" str.from(-2) # => "lo" You can mix it with to method and do fun things like: str = "hello" str.from(0).to(-1) # => "hello" str.from(1).to(-2) # => "ell"

new

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

radio_button_tag

radio_button_tag(name, value, checked = false, options = {}) Instance Public methods Creates a radio button; use groups of radio buttons named the same to allow users to select from a group of options. Options :disabled - If set to true, the user will not be able to use this input. Any other key creates standard HTML options for the tag. Examples radio_button_tag 'gender', 'male' # => <input id="gender_male" name="gender" type="radio" value="male" /> radio_button_ta

add_silencer

add_silencer(&block) Instance Public methods Adds a silencer from the block provided. If the silencer returns true for a given line, it will be excluded from the clean backtrace. # Will reject all lines that include the word "mongrel", like "/gems/mongrel/server.rb" or "/app/my_mongrel_server/rb" backtrace_cleaner.add_silencer { |line| line =~ /mongrel/ }

has_renderer?

has_renderer?() Instance Protected methods Check whether the necessary Renderer is available

error

error(error_message) Instance Public methods

megabyte

megabyte() Instance Public methods Alias for: megabytes