test_persisted?

test_persisted?() Instance Public methods Responds to persisted? Returns a boolean that specifies whether the object has been persisted yet. This is used when calculating the URL for an object. If the object is not persisted, a form for that object, for instance, will route to the create action. If it is persisted, a form for the object will routes to the update action.

rack_app

rack_app(app = self.app) Instance Public methods

symbolized_path_parameters

symbolized_path_parameters() Instance Public methods The same as path_parameters with explicitly symbolized keys.

config

config() Instance Public methods

to_param

to_param() Instance Public methods Returns a String, which Action Pack uses for constructing an URL to this object. The default implementation returns this record's id as a String, or nil if this record's unsaved. For example, suppose that you have a User model, and that you have a resources :users route. Normally, user_path will construct a path with the user object's 'id' in it: user = User.find_by(name: 'Phusion') user_path(user) # => "/users/1" You can override to_param in

timestamps

timestamps(*args) Instance Public methods Appends :datetime columns :created_at and :updated_at to the table.

to_str

to_str() Instance Public methods

reflections

reflections() Instance Public methods Returns a Hash of name of the reflection as the key and a AssociationReflection as the value. Account.reflections # => {balance: AggregateReflection} @api public

save

save(options={}) Instance Public methods The validation process on save can be skipped by passing validate: false. The regular #save method is replaced with this when the validations module is mixed in, which it is by default.

sqlite_version

sqlite_version() Instance Protected methods