Filename: snake_case
, orders_controller.rb
Classes: CamelCase
, ApplicationController
, 'PropertiesController'
Variables: snake_case
, order_amount
, total
, var1
Methods: snake_case
, index
, create
, save!
(operates destructively or raise an exception instead of failing), empty?
(returns bool value)
Database Tables: snake_case
plural: users
, orders
, bigfoot_sightings
Model: CamelCase
singular: User
, Order
, BigfootSighting
- :primary_key
- :string - :text
- :integer - :bigint - :float - :decimal
- :numeric
- :datetime - :date - :time
- :binary
- :boolean
$ rails g model user name:string{30} username:string:uniq weight:decimal{4,1} office:references