toggle!

toggle!(attribute) Instance Public methods Wrapper around toggle that saves the record. This method differs from its non-bang version in that it passes through the attribute setter. Saving is not subjected to validation checks. Returns true if the record could be saved.

==

==(other) Instance Public methods Equivalent to String#==. Returns true if the class name and other are equal, otherwise false. class BlogPost extend ActiveModel::Naming end BlogPost.model_name == 'BlogPost' # => true BlogPost.model_name == 'Blog Post' # => false

schema_creation

schema_creation() Instance Public methods

schema_creation

schema_creation() Instance Public methods

test_inheritance_new_with_default_class

test_inheritance_new_with_default_class() Instance Public methods

write

write(name, value, options = nil) Instance Public methods Writes the value to the cache, with the key. Options are passed to the underlying cache implementation.

request_via_redirect

request_via_redirect(http_method, path, parameters = nil, headers_or_env = nil) Instance Public methods Performs a request using the specified method, following any subsequent redirect. Note that the redirects are followed until the response is not a redirectâthis means you may run into an infinite loop if your redirect loops back to itself.

last_month

last_month() Instance Public methods Alias for: prev_month

rakefile

rakefile(filename, data=nil, &block) Instance Public methods Create a new Rakefile with the provided code (either in a block or a string). rakefile("bootstrap.rake") do project = ask("What is the UNIX name of your project?") <<-TASK namespace :#{project} do task :bootstrap do puts "I like boots!" end end TASK end rakefile('seed.rake', 'puts "Planting seeds"')

rename_table

rename_table(table_name, new_name) Instance Public methods Renames a table. Also renames a table's primary key sequence if the sequence name matches the Active Record default. Example: rename_table('octopuses', 'octopi')