diff --git a/config/application.rb b/config/application.rb index 53e5a6d..9389a77 100644 --- a/config/application.rb +++ b/config/application.rb @@ -4,7 +4,7 @@ require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line - Bundler.require *Rails.groups(:assets => %w(development test)) + Bundler.require *Rails.groups(assets: %w(development test)) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end diff --git a/config/environments/development.rb b/config/environments/development.rb index 1c57849..3e052aa 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -33,6 +33,6 @@ DanBarberPhoto::Application.configure do config.action_mailer.delivery_method = :letter_opener - config.action_mailer.default_url_options = { :host => "danbarberphoto.dev" } + config.action_mailer.default_url_options = { host: "danbarberphoto.dev" } end diff --git a/config/environments/production.rb b/config/environments/production.rb index 13b7587..146ab36 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -66,15 +66,15 @@ DanBarberPhoto::Application.configure do # Settings for Sendgrid Free on Heroku ActionMailer::Base.smtp_settings = { - :address => 'smtp.sendgrid.net', - :port => '587', - :authentication => :plain, - :user_name => ENV['SENDGRID_USERNAME'], - :password => ENV['SENDGRID_PASSWORD'], - :domain => 'heroku.com' + address: 'smtp.sendgrid.net', + port: '587', + authentication: :plain, + user_name: ENV['SENDGRID_USERNAME'], + password: ENV['SENDGRID_PASSWORD'], + domain: 'heroku.com' } ActionMailer::Base.delivery_method = :smtp - config.action_mailer.default_url_options = { :host => "danbarberphoto.com" } + config.action_mailer.default_url_options = { host: "danbarberphoto.com" } end diff --git a/db/migrate/20101008172319_move_to_many_to_many.rb b/db/migrate/20101008172319_move_to_many_to_many.rb index c255951..465649f 100644 --- a/db/migrate/20101008172319_move_to_many_to_many.rb +++ b/db/migrate/20101008172319_move_to_many_to_many.rb @@ -1,7 +1,7 @@ class MoveToManyToMany < ActiveRecord::Migration def self.up remove_column :photos, :category_id - create_table :categories_photos, :id => false do |t| + create_table :categories_photos, id: false do |t| t.integer :category_id t.integer :photo_id end diff --git a/db/migrate/20101011133558_create_admin_users.rb b/db/migrate/20101011133558_create_admin_users.rb index d269e1a..d436022 100644 --- a/db/migrate/20101011133558_create_admin_users.rb +++ b/db/migrate/20101011133558_create_admin_users.rb @@ -2,14 +2,14 @@ class CreateAdminUsers < ActiveRecord::Migration def self.up create_table :admin_users do |t| - t.string :first_name, :default => "", :null => false - t.string :last_name, :default => "", :null => false - t.string :role, :null => false - t.string :email, :null => false - t.boolean :status, :default => false - t.string :token, :null => false - t.string :salt, :null => false - t.string :crypted_password, :null => false + t.string :first_name, default: "", null: false + t.string :last_name, default: "", null: false + t.string :role, null: false + t.string :email, null: false + t.boolean :status, default: false + t.string :token, null: false + t.string :salt, null: false + t.string :crypted_password, null: false t.string :preferences t.timestamps end diff --git a/db/migrate/20101013165208_photo_showcase.rb b/db/migrate/20101013165208_photo_showcase.rb index 501fb67..ed30e2b 100644 --- a/db/migrate/20101013165208_photo_showcase.rb +++ b/db/migrate/20101013165208_photo_showcase.rb @@ -1,6 +1,6 @@ class PhotoShowcase < ActiveRecord::Migration def self.up - add_column :photos, :featured, :boolean, :default => false + add_column :photos, :featured, :boolean, default: false end def self.down diff --git a/db/migrate/20101202155552_add_enabled_to_photos.rb b/db/migrate/20101202155552_add_enabled_to_photos.rb index 8355e14..86b09e5 100644 --- a/db/migrate/20101202155552_add_enabled_to_photos.rb +++ b/db/migrate/20101202155552_add_enabled_to_photos.rb @@ -1,6 +1,6 @@ class AddEnabledToPhotos < ActiveRecord::Migration def self.up - add_column :photos, :enabled, :boolean, :default => true + add_column :photos, :enabled, :boolean, default: true end def self.down diff --git a/db/migrate/20101216180143_add_view_count_to_photos.rb b/db/migrate/20101216180143_add_view_count_to_photos.rb index 4ef78f2..5320637 100644 --- a/db/migrate/20101216180143_add_view_count_to_photos.rb +++ b/db/migrate/20101216180143_add_view_count_to_photos.rb @@ -1,6 +1,6 @@ class AddViewCountToPhotos < ActiveRecord::Migration def self.up - add_column :photos, :views, :integer, :default => 0 + add_column :photos, :views, :integer, default: 0 end def self.down diff --git a/db/migrate/20111013085444_add_sessions_table.rb b/db/migrate/20111013085444_add_sessions_table.rb index fd942cc..37d1a63 100644 --- a/db/migrate/20111013085444_add_sessions_table.rb +++ b/db/migrate/20111013085444_add_sessions_table.rb @@ -1,7 +1,7 @@ class AddSessionsTable < ActiveRecord::Migration def up create_table :sessions do |t| - t.string :session_id, :null => false + t.string :session_id, null: false t.text :data t.timestamps end diff --git a/db/migrate/20111030163656_remove_admin_users.rb b/db/migrate/20111030163656_remove_admin_users.rb index 0b31c69..5f3be82 100644 --- a/db/migrate/20111030163656_remove_admin_users.rb +++ b/db/migrate/20111030163656_remove_admin_users.rb @@ -5,14 +5,14 @@ class RemoveAdminUsers < ActiveRecord::Migration def self.down create_table :admin_users do |t| - t.string :first_name, :default => "", :null => false - t.string :last_name, :default => "", :null => false - t.string :role, :null => false - t.string :email, :null => false - t.boolean :status, :default => false - t.string :token, :null => false - t.string :salt, :null => false - t.string :crypted_password, :null => false + t.string :first_name, default: "", null: false + t.string :last_name, default: "", null: false + t.string :role, null: false + t.string :email, null: false + t.boolean :status, default: false + t.string :token, null: false + t.string :salt, null: false + t.string :crypted_password, null: false t.string :preferences t.timestamps end diff --git a/db/migrate/20111030164012_create_devise_admin_users.rb b/db/migrate/20111030164012_create_devise_admin_users.rb index bb694f4..e00f3e8 100644 --- a/db/migrate/20111030164012_create_devise_admin_users.rb +++ b/db/migrate/20111030164012_create_devise_admin_users.rb @@ -2,8 +2,8 @@ class CreateDeviseAdminUsers < ActiveRecord::Migration def up create_table(:admin_users) do |t| # Database authenticatable - t.string :email, :null => false, :default => "" - t.string :encrypted_password, :null => false, :default => "" + t.string :email, null: false, default: "" + t.string :encrypted_password, null: false, default: "" # Recoverable t.string :reset_password_token @@ -13,7 +13,7 @@ class CreateDeviseAdminUsers < ActiveRecord::Migration t.datetime :remember_created_at # Trackable - t.integer :sign_in_count, :default => 0 + t.integer :sign_in_count, default: 0 t.datetime :current_sign_in_at t.datetime :last_sign_in_at t.string :current_sign_in_ip @@ -26,18 +26,18 @@ class CreateDeviseAdminUsers < ActiveRecord::Migration t.string :unconfirmed_email # Only if using reconfirmable # Lockable - t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts + t.integer :failed_attempts, default: 0 # Only if lock strategy is :failed_attempts t.string :unlock_token # Only if unlock strategy is :email or :both t.datetime :locked_at t.timestamps end - add_index :admin_users, :email, :unique => true - add_index :admin_users, :reset_password_token, :unique => true - add_index :admin_users, :confirmation_token, :unique => true - add_index :admin_users, :unlock_token, :unique => true - # add_index :admin_users, :authentication_token, :unique => true + add_index :admin_users, :email, unique: true + add_index :admin_users, :reset_password_token, unique: true + add_index :admin_users, :confirmation_token, unique: true + add_index :admin_users, :unlock_token, unique: true + # add_index :admin_users, :authentication_token, unique: true end def down diff --git a/db/migrate/20151022110802_remove_devise_admin_users.rb b/db/migrate/20151022110802_remove_devise_admin_users.rb index 5da29d5..5c392e0 100644 --- a/db/migrate/20151022110802_remove_devise_admin_users.rb +++ b/db/migrate/20151022110802_remove_devise_admin_users.rb @@ -6,8 +6,8 @@ class RemoveDeviseAdminUsers < ActiveRecord::Migration def down create_table(:admin_users) do |t| # Database authenticatable - t.string :email, :null => false, :default => "" - t.string :encrypted_password, :null => false, :default => "" + t.string :email, null: false, default: "" + t.string :encrypted_password, null: false, default: "" # Recoverable t.string :reset_password_token @@ -17,7 +17,7 @@ class RemoveDeviseAdminUsers < ActiveRecord::Migration t.datetime :remember_created_at # Trackable - t.integer :sign_in_count, :default => 0 + t.integer :sign_in_count, default: 0 t.datetime :current_sign_in_at t.datetime :last_sign_in_at t.string :current_sign_in_ip @@ -30,16 +30,16 @@ class RemoveDeviseAdminUsers < ActiveRecord::Migration t.string :unconfirmed_email # Only if using reconfirmable # Lockable - t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts + t.integer :failed_attempts, default: 0 # Only if lock strategy is :failed_attempts t.string :unlock_token # Only if unlock strategy is :email or :both t.datetime :locked_at t.timestamps end - add_index :admin_users, :email, :unique => true - add_index :admin_users, :reset_password_token, :unique => true - add_index :admin_users, :confirmation_token, :unique => true - add_index :admin_users, :unlock_token, :unique => true + add_index :admin_users, :email, unique: true + add_index :admin_users, :reset_password_token, unique: true + add_index :admin_users, :confirmation_token, unique: true + add_index :admin_users, :unlock_token, unique: true end end diff --git a/db/seeds.rb b/db/seeds.rb index 664d8c7..4b46ca3 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -3,5 +3,5 @@ # # Examples: # -# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) -# Mayor.create(:name => 'Daley', :city => cities.first) +# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) +# Mayor.create(name: 'Daley', city: cities.first)