test_alt_complex_inheritance

test_alt_complex_inheritance() Instance Public methods

section

section(routes) Instance Public methods

relative_existing_migration

relative_existing_migration() Instance Public methods

each

each() Instance Public methods

weeks_ago

weeks_ago(weeks) Instance Public methods Returns a new date/time the specified number of weeks ago.

new

new(path, watcher) Class Public methods

image_path

image_path(source, options = {}) Instance Public methods Computes the path to an image asset. Full paths from the document root will be passed through. Used internally by image_tag to build the image path: image_path("edit") # => "/assets/edit" image_path("edit.png") # => "/assets/edit.png" image_path("icons/edit.png") # => "/assets/icons/edit.png" image_path("/icons/e

size

size() Instance Public methods Shortcut for tempfile.size.

since

since(seconds) Instance Public methods Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) and then adds the specified number of seconds in

validates_acceptance_of

validates_acceptance_of(*attr_names) Instance Public methods Encapsulates the pattern of wanting to validate the acceptance of a terms of service check box (or similar agreement). class Person < ActiveRecord::Base validates_acceptance_of :terms_of_service validates_acceptance_of :eula, message: 'must be abided' end If the database column does not exist, the terms_of_service attribute is entirely virtual. This check is performed only if terms_of_service is not nil and by def