Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Students::RegistrationsController < Devise::RegistrationsController
- def create
- @student = build_resource
- super
- end
- end
- Merit.setup do |config|
- config.checks_on_each_request = true
- config.orm = :active_record
- config.user_model_name = 'Student'
- end
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement