diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 338ba9e..fe3908f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,7 +1,7 @@ module ApplicationHelper def page_title(title) if title.present? - "#{title} - #{APP_CONFIG["page_title"]}" + "#{title} - #{APP_CONFIG['page_title']}" else APP_CONFIG["page_title"] end diff --git a/app/helpers/photos_helper.rb b/app/helpers/photos_helper.rb index 1950b43..4f8a35e 100644 --- a/app/helpers/photos_helper.rb +++ b/app/helpers/photos_helper.rb @@ -1,5 +1,11 @@ module PhotosHelper def link_to_photo(photo) - link_to "", photo.image.url, rel: "photos", class: "fancy", data: { id: photo.id } + link_to( + "", + photo.image.url, + rel: "photos", + class: "fancy", + data: { id: photo.id }, + ) end end diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index ad40afa..3123abe 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -3,6 +3,10 @@ class Notifier < ActionMailer::Base def contact_notification(sender) @sender = sender - mail(to: "enquiries@danbarberphoto.com", from: sender.email, subject: sender.subject) + mail( + to: "enquiries@danbarberphoto.com", + from: sender.email, + subject: sender.subject, + ) end end diff --git a/config/application.rb b/config/application.rb index 1968de7..09a560e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,26 +11,34 @@ end module DanBarberPhoto class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. + # Settings in config/environments/* take precedence over those specified + # here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Custom directories with classes and modules you want to be autoloadable. # config.autoload_paths += %W(#{config.root}/extras) - # Only load the plugins named here, in the order given (default is alphabetical). + # Only load the plugins named here, in the order given + # (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named. # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer + # config.active_record.observers = :cacher, :garbage_collector, + # :forum_observer - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. + # Set Time.zone default to the specified zone and make Active Record + # auto-convert to this zone. + # Run "rake -D time" for a list of tasks for finding time zone names. + # Default is UTC. # config.time_zone = "Central Time (US & Canada)" - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - config.i18n.load_path += Dir[Rails.root.join("my", "locales", "*.{rb,yml}").to_s] + # The default locale is :en and all translations from + # config/locales/*.rb,yml are auto loaded. + config.i18n.load_path += Dir[ + Rails.root.join("my", "locales", "*.{rb,yml}").to_s + ] config.i18n.enforce_available_locales = true config.i18n.default_locale = :en @@ -43,7 +51,9 @@ module DanBarberPhoto # Enable the asset pipeline config.assets.enabled = true - config.assets.precompile += %w(favicon.ico fancybox/sprite.png fancybox/loading.gif fancybox/blank.gif fancybox/overlay.png) + config.assets.precompile += %w(favicon.ico fancybox/sprite.png + fancybox/loading.gif fancybox/blank.gif + fancybox/overlay.png) # Version of your assets, change this if you want to expire all your assets config.assets.version = "1.0" diff --git a/config/environments/production.rb b/config/environments/production.rb index 3fa6430..87b76db 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,5 +1,6 @@ DanBarberPhoto::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # Settings specified here will take precedence over those in + # config/application.rb # Code is not reloaded between requests config.cache_classes = true @@ -33,7 +34,8 @@ DanBarberPhoto::Application.configure do # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # Force all access to the app over SSL, use Strict-Transport-Security, and + # use secure cookies. # config.force_ssl = true # See everything in the log (default is :info) @@ -48,7 +50,8 @@ DanBarberPhoto::Application.configure do # Enable serving of images, stylesheets, and JavaScripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) + # Precompile additional assets (application.js, application.css, and + # all non-JS/CSS are already added) config.assets.precompile += %w(administrate/overrides.css) # Disable delivery errors, bad email addresses will be ignored @@ -71,10 +74,9 @@ DanBarberPhoto::Application.configure do authentication: :plain, user_name: ENV["SENDGRID_USERNAME"], password: ENV["SENDGRID_PASSWORD"], - domain: "heroku.com" + domain: "heroku.com", } ActionMailer::Base.delivery_method = :smtp config.action_mailer.default_url_options = { host: "danbarberphoto.com" } - end diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 5ad1bba..972b62e 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,6 +1,7 @@ # Be sure to restart your server when you modify this file. -DanBarberPhoto::Application.config.session_store :cookie_store, key: "_danbarberphoto_session" +DanBarberPhoto::Application.config.session_store :cookie_store, + key: "_danbarberphoto_session" # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information