Class: Hancock::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hancock/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/hancock/configuration.rb', line 69

def initialize
  @main_index_layout = 'application'
  @error_layout = 'application'

  @localize = !!defined?(RailsAdminMongoidLocalizeField) #false
  @raven_support = !!defined?(Raven)

  @ability_manager_config = []
  @ability_admin_config = []

  @recaptcha_support = !!defined?(Recaptcha)
  @simple_captcha_support = !!defined?(SimpleCaptcha)

  @admin_enter_captcha = @recaptcha_support or @simple_captcha_support
  @registration_captcha = @admin_enter_captcha

  @captcha_on_development = false

  @history_tracking = true

  @mongoid_single_collection = nil

  @navigation_labels = []

  @erb2coffee_assets = ['hancock/rails_admin/plugins.coffee.erb']

end

Instance Attribute Details

#ability_admin_configObject

Returns the value of attribute ability_admin_config.



52
53
54
# File 'lib/hancock/configuration.rb', line 52

def ability_admin_config
  @ability_admin_config
end

#ability_manager_configObject

Returns the value of attribute ability_manager_config.



51
52
53
# File 'lib/hancock/configuration.rb', line 51

def ability_manager_config
  @ability_manager_config
end

#admin_enter_captchaObject

Returns the value of attribute admin_enter_captcha.



54
55
56
# File 'lib/hancock/configuration.rb', line 54

def admin_enter_captcha
  @admin_enter_captcha
end

#captcha_on_developmentObject

Returns the value of attribute captcha_on_development.



59
60
61
# File 'lib/hancock/configuration.rb', line 59

def captcha_on_development
  @captcha_on_development
end

#erb2coffee_assetsObject

Returns the value of attribute erb2coffee_assets.



67
68
69
# File 'lib/hancock/configuration.rb', line 67

def erb2coffee_assets
  @erb2coffee_assets
end

#error_layoutObject

Returns the value of attribute error_layout.



46
47
48
# File 'lib/hancock/configuration.rb', line 46

def error_layout
  @error_layout
end

#history_trackingObject

Returns the value of attribute history_tracking.



61
62
63
# File 'lib/hancock/configuration.rb', line 61

def history_tracking
  @history_tracking
end

#localizeObject

Returns the value of attribute localize.



48
49
50
# File 'lib/hancock/configuration.rb', line 48

def localize
  @localize
end

#main_index_layoutObject

Returns the value of attribute main_index_layout.



45
46
47
# File 'lib/hancock/configuration.rb', line 45

def main_index_layout
  @main_index_layout
end

#mongoid_single_collectionObject

Returns the value of attribute mongoid_single_collection.



63
64
65
# File 'lib/hancock/configuration.rb', line 63

def mongoid_single_collection
  @mongoid_single_collection
end

Returns the value of attribute navigation_labels.



65
66
67
# File 'lib/hancock/configuration.rb', line 65

def navigation_labels
  @navigation_labels
end

#raven_supportObject

Returns the value of attribute raven_support.



49
50
51
# File 'lib/hancock/configuration.rb', line 49

def raven_support
  @raven_support
end

#recaptcha_supportObject

Returns the value of attribute recaptcha_support.



56
57
58
# File 'lib/hancock/configuration.rb', line 56

def recaptcha_support
  @recaptcha_support
end

#registration_captchaObject

Returns the value of attribute registration_captcha.



55
56
57
# File 'lib/hancock/configuration.rb', line 55

def registration_captcha
  @registration_captcha
end

#simple_captcha_supportObject

Returns the value of attribute simple_captcha_support.



57
58
59
# File 'lib/hancock/configuration.rb', line 57

def simple_captcha_support
  @simple_captcha_support
end