Sha256: 4bcc214ba164eeaa8391b8cc3b67006aa7683b7381526ac303cd099d4725cf53
Contents?: true
Size: 1.69 KB
Versions: 6
Compression:
Stored size: 1.69 KB
Contents
EffectiveEmailTemplates.setup do |config| # Database table name to store email_templates in. Default is :email_templates config.email_templates_table_name = :email_templates # SimpleForm Options # This Hash of options will be passed into any simple_form_for() calls config.simple_form_options = {} # config.simple_form_options = { # :html => {:class => 'form-horizontal'}, # :wrapper => :horizontal_form, # :wrapper_mappings => { # :boolean => :horizontal_boolean, # :check_boxes => :horizontal_radio_and_checkboxes, # :radio_buttons => :horizontal_radio_and_checkboxes # } # } # Layout Settings # Configure the Layout per controller, or all at once # config.layout = 'application' # All EffectiveEmailTemplates controllers will use this layout config.layout = { :email_templates => 'application', :admin_email_templates => 'application' } # Authorization Method # # This method is called by all controller actions with the appropriate action and resource # If the method returns false, an Effective::AccessDenied Error will be raised (see README.md for complete info) # # Use via Proc (and with CanCan): # config.authorization_method = Proc.new { |controller, action, resource| can?(action, resource) } # # Use via custom method: # config.authorization_method = :my_authorization_method # # And then in your application_controller.rb: # # def my_authorization_method(action, resource) # current_user.is?(:admin) # end # # Or disable the check completely: # config.authorization_method = false config.authorization_method = Proc.new { |controller, action, resource| can?(action, resource) } # CanCan gem end
Version data entries
6 entries across 6 versions & 1 rubygems