Sha256: 3398d17eafc1c1dce79902be4e55daf4c1ecfee873f4cfa998d325a3970061a9

Contents?: true

Size: 1.73 KB

Versions: 4

Compression:

Stored size: 1.73 KB

Contents

# Change the settings below to suit your needs
# All settings are initially set to their default values
FinePrint.configure do |config|
  # Engine Configuration

  # Name of the ApplicationController helper method that returns the current user.
  # Default: 'current_user'
  config.current_user_method = 'current_user'

  # Proc called with user as argument that should return true if and only if the user is an admin.
  # Admins can create and edit agreements and terminate accepted agreements.
  # Default: lambda { |user| false } (no admins)
  config.user_admin_proc = lambda { |user| user.is_admin }

  # Proc that returns true if and only if the provided user is logged in.
  # In many systems, a non-logged-in user is represented by nil.
  # However, some systems use something like an AnonymousUser class to represent this state.
  # This proc is mostly used to help the developer realize that they should only be asking
  # signed in users to sign contracts; without this, developers would get a cryptic SQL error.
  # Default: lambda { |user| !user.nil? }
  config.user_signed_in_proc = lambda { |user| !user.nil? }

  # Path to redirect users to when an error occurs (e.g. permission denied on admin pages).
  # Default: '/'
  config.redirect_path = '/'

  # Signature (fine_print_get_signatures) Configuration

  # Path to redirect users to when they need to agree to contract(s).
  # A list of contract names that must be agreed to will be available in the 'contracts' parameter.
  # Your code doesn't have to deal with all of them at once, e.g. you can get
  # the user to agree to the first one and then they'll just eventually be
  # redirected back to this page with the remaining contract names.
  # Default: '/'
  config.pose_contracts_path = '/'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fine_print-1.2.0 spec/dummy/config/initializers/fine_print.rb~
fine_print-1.1.1 spec/dummy/config/initializers/fine_print.rb
fine_print-1.1.0 spec/dummy/config/initializers/fine_print.rb
fine_print-1.0.0 spec/dummy/config/initializers/fine_print.rb