table_name=

table_name=(value) Instance Public methods Sets the table name explicitly. Example: class Project < ActiveRecord::Base self.table_name = "project" end You can also just define your own self.table_name method; see the documentation for ActiveRecord::Base#table_name.

destroy

destroy(id) Instance Public methods Destroy an object (or multiple objects) that has the given id. The object is instantiated first, therefore all callbacks and filters are fired off before the object is deleted. This method is less efficient than ActiveRecord#delete but allows cleanup methods and other actions to be run. This essentially finds the object (or multiple objects) with the given id, creates a new object from the attributes, and then calls destroy on it. Parameters id

encode_with

encode_with(coder) Instance Public methods

delete

delete() Instance Public methods Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can't be persisted). Returns the frozen instance. The row is simply removed with an SQL DELETE statement on the record's primary key, and no callbacks are executed. To enforce the object's before_destroy and after_destroy callbacks or any :dependent association options, use #destroy.

deep_stringify_keys

deep_stringify_keys() Instance Public methods Returns a new hash with all keys converted to strings. This includes the keys from the root hash and from all nested hashes and arrays. hash = { person: { name: 'Rob', age: '28' } } hash.deep_stringify_keys # => {"person"=>{"name"=>"Rob", "age"=>"28"}}

titleize

titleize(word) Instance Public methods Capitalizes all the words and replaces some characters in the string to create a nicer looking title. titleize is meant for creating pretty output. It is not used in the Rails internals. titleize is also aliased as titlecase. 'man from the boondocks'.titleize # => "Man From The Boondocks" 'x-men: the last stand'.titleize # => "X Men: The Last Stand" 'TheManWithoutAPast'.titleize # => "The Man Without A Past" 'raiders_of_the

on_end_document

on_end_document() Instance Public methods

app

app() Instance Public methods TODO: this is no longer required but we keep it for the moment to support older config.ru files.

generate_document_metadata

generate_document_metadata(mobi_outfile) Instance Public methods

sanitize_css

sanitize_css(style) Instance Public methods Sanitizes a block of css code. Used by sanitize when it comes across a style attribute