Sha256: 1928301b28cae44b5508a32e94dc39e9f4b562cc7efc3bd2935b6d0afd895a65

Contents?: true

Size: 1.08 KB

Versions: 17

Compression:

Stored size: 1.08 KB

Contents

# Use this hook to configure merit parameters
Merit.setup do |config|
  # Check rules on each request or in background
  # config.checks_on_each_request = true

  # Define ORM. Could be :active_record (default) and :mongoid
  # config.orm = :active_record

  # Add application observers to get notifications when reputation changes.
  # config.add_observer 'MyObserverClassName'

  # Define :user_model_name. This model will be used to grand badge if no
  # `:to` option is given. Default is 'User'.
  # config.user_model_name = 'User'

  # Define :current_user_method. Similar to previous option. It will be used
  # to retrieve :user_model_name object if no `:to` option is given. Default
  # is "current_#{user_model_name.downcase}".
  # config.current_user_method = 'current_user'
end

# Create application badges (uses https://github.com/norman/ambry)
# badge_id = 0
# [{
#   id: (badge_id = badge_id+1),
#   name: 'just-registered'
# }, {
#   id: (badge_id = badge_id+1),
#   name: 'best-unicorn',
#   custom_fields: { category: 'fantasy' }
# }].each do |attrs|
#   Merit::Badge.create! attrs
# end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
merit-3.0.3 lib/generators/merit/templates/merit.rb
merit-3.0.2 lib/generators/merit/templates/merit.rb
merit-3.0.1 lib/generators/merit/templates/merit.rb
merit-3.0.0 lib/generators/merit/templates/merit.rb
merit-2.4.0 lib/generators/merit/templates/merit.rb
merit-2.3.4 lib/generators/merit/templates/merit.rb
merit-2.3.3 lib/generators/merit/templates/merit.rb
merit-2.3.2 lib/generators/merit/templates/merit.rb
merit-2.3.1 lib/generators/merit/templates/merit.rb
merit-2.3.0 lib/generators/merit/templates/merit.rb
merit-2.2.0 lib/generators/merit/templates/merit.rb
merit-2.1.2 lib/generators/merit/templates/merit.rb
merit-2.1.1 lib/generators/merit/templates/merit.rb
merit-2.1.0 lib/generators/merit/templates/merit.rb
merit-2.0.0 lib/generators/merit/templates/merit.rb
merit-1.9.0 lib/generators/merit/templates/merit.rb
merit-1.8.0 lib/generators/merit/templates/merit.rb