Sha256: f8dc0a3abbbdf3c05b1f7417410b90ad339bc7ebe683333f4b0fee907611d0ef

Contents?: true

Size: 1.07 KB

Versions: 27

Compression:

Stored size: 1.07 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 :mongo_mapper and :mongoid
  config.orm = :mongoid
end

# Create application badges (uses https://github.com/norman/ambry)
badge_id = 0
[{
  :id => (badge_id = badge_id+1),
  :name        => 'commenter',
  :description => 'You\'ve participated good in our boards!',
  :level       => 10
}, {
  :id => (badge_id = badge_id+1),
  :name        => 'commenter',
  :description => 'You\'ve participated great in our boards!'
}, {
  :id => (badge_id = badge_id+1),
  :name        => 'relevant-commenter',
  :description => 'You\'ve received 5 votes on a comment.'
}, {
  :id => (badge_id = badge_id+1),
  :name        => 'autobiographer',
  :description => 'You\'ve edited your name and it\'s above 4 characters! (?)'
}, {
  :id => (badge_id = badge_id+1),
  :name => 'just-registered'
}, {
  :id => (badge_id = badge_id+1),
  :name => 'gossip'
}].each do |badge|
  Badge.create! badge
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
merit-1.7.0 test/dummy-mongoid/config/initializers/merit.rb
merit-1.6.2 test/dummy-mongoid/config/initializers/merit.rb
merit-1.6.1 test/dummy-mongoid/config/initializers/merit.rb
merit-1.6.0 test/dummy-mongoid/config/initializers/merit.rb
merit-1.5.0 test/dummy-mongoid/config/initializers/merit.rb
merit-1.4.0 test/dummy-mongoid/config/initializers/merit.rb
merit-1.3.1 test/dummy-mongoid/config/initializers/merit.rb
merit-1.3.0 test/dummy-mongoid/config/initializers/merit.rb
merit-1.2.3 test/dummy-mongoid/config/initializers/merit.rb
merit-1.2.2 test/dummy-mongoid/config/initializers/merit.rb
merit-1.2.1 test/dummy-mongoid/config/initializers/merit.rb
merit-1.2.0 test/dummy-mongoid/config/initializers/merit.rb
merit-1.1.2 test/dummy-mongoid/config/initializers/merit.rb
merit-1.1.1 test/dummy-mongoid/config/initializers/merit.rb
merit-1.1.0 test/dummy-mongoid/config/initializers/merit.rb
merit-1.0.1 test/dummy-mongoid/config/initializers/merit.rb
merit-1.0.0 test/dummy-mongoid/config/initializers/merit.rb
merit-0.10.1 test/dummy-mongoid/config/initializers/merit.rb
merit-0.10.0 test/dummy-mongoid/config/initializers/merit.rb
merit-0.9.5 test/dummy-mongoid/config/initializers/merit.rb