module Boxroom::Models::ClassMethods

Public Instance Methods

boxroom(params) click to toggle source
# File lib/boxroom/models.rb, line 4
def boxroom(params)
  throw "Provide 'name:' param for 'boxroom' method in your user model" if params[:name].nil?
  throw "Provide 'email:' param for 'boxroom' method in your user model" if params[:email].nil?
  throw "Provide 'is_admin:' param for 'boxroom' method in your user model" if params[:is_admin].nil?

  after_save -> { save_boxroom_user(params) }
  before_destroy -> { destroy_boxroom_user(params) }
end