1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00
This commit is contained in:
Daniel Barber 2018-02-15 23:09:36 -05:00
parent 4dd906c0e7
commit 67897bddfb
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
6 changed files with 40 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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