Flowdock
method

first_or_initialize

Importance_1
Ruby on Rails latest stable (v4.2.7) - 1 note - Class: ActiveRecord::Relation
first_or_initialize(attributes = nil, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Show source
Register or log in to add new notes.
March 21, 2016
0 thanks

Description

Selects the first record within a relation if it exists, otherwise creates a new record with the optional attributes.