send_file

send_file(event) Instance Public methods

decrement

decrement(name, amount = 1, options = nil) Instance Public methods Decrements an already existing integer value that is stored in the cache. If the key is not found nothing is done.

add

add(table_name) Instance Public methods Add internal cache for table with table_name.

assert_no_file

assert_no_file(relative) Instance Public methods Asserts a given file does not exist. You need to supply an absolute path or a path relative to the configured destination: assert_no_file "config/random.rb" assert_no_directory

create

create(attributes = nil, &block) Instance Public methods Creates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not. The attributes parameter can be either a Hash or an Array of Hashes. These Hashes describe the attributes on the objects that are to be created. Examples # Create a single new object User.create(first_name: 'Jamie') # Create an Array

html_document

html_document() Instance Public methods

exec_update

exec_update(sql, name, binds) Instance Public methods Executes update sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

touch

touch(name = nil) Instance Public methods Saves the record with the updated_at/on attributes set to the current time. Please note that no validation is performed and only the after_touch, after_commit and after_rollback callbacks are executed. If an attribute name is passed, that attribute is updated along with updated_at/on attributes. product.touch # updates updated_at/on product.touch(:designed_at) # updates the designed_at attribute and updated_at/on If used alon

dump

dump(value) Class Public methods

formatted_offset

formatted_offset(colon = true, alternate_utc_string = nil) Instance Public methods Returns the UTC offset as an +HH:MM formatted string. Time.local(2000).formatted_offset # => "-06:00" Time.local(2000).formatted_offset(false) # => "-0600"