This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CarrierWave.configure do |config| | |
| if Rails.env.development? or Rails.env.test? | |
| config.asset_host = "http://localhost:#{(ENV['PORT'].try(:to_i) || 3000)}" | |
| config.storage = :file | |
| else | |
| config.storage = :aws | |
| config.aws_bucket = ENV['S3_BUCKET_NAME'] || "contracts-#{Rails.env}" | |
| config.aws_acl = 'public-read' | |
| # Optionally define an asset host for configurations that are fronted by a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default: &default | |
| adapter: postgresql | |
| host: <%= ENV['DB_HOST'] %> | |
| encoding: unicode | |
| pool: 5 | |
| username: <%= ENV['DB_USERNAME'] %> | |
| password: <%= ENV['DB_PASSWORD'] %> | |
| database: <%= ENV['DB_DATABASE'] %> | |
| template: template0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module HasManyThrough | |
| extend ActiveSupport::Concern | |
| class_methods do | |
| def define_through associations = {} | |
| class_eval do | |
| associations.each do |model, through_model| | |
| model_name = model.to_s.underscore | |
| define_method "#{model_name}_ids" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CustomDeviseMailer < Devise::Mailer | |
| helper :application # gives access to all helpers defined within `application_helper`. | |
| include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url` | |
| default template_path: 'devise/mailer' # to make sure that your mailer uses the devise views | |
| def reset_password_instructions(record, token, opts={}) | |
| opts[:subject] = I18n.t(:'devise.mailer.reset_password_instructions.subject', app_name: ENV['APP_NAME']) | |
| super | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Your other configuration i.e. github repo, branch, deploy_to etc | |
| ......... | |
| namespace :deploy do | |
| # Your other configuration i.e. start/stop puma/passanger/any other application server | |
| ...... | |
| before :updated, :setup_solr_data_dir do | |
| invoke 'solr:symlink' | |
| end |
NewerOlder