Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User < ActiveRecord::Base
- has_many :customers, :class_name => "User", :foreign_key => "advocate_id"
- belongs_to :advocate, :class_name => "User"
- has_many :caredates
- end
- class Caredate < ActiveRecord::Base
- belongs_to :user
- end
- class CaredatesController < ApplicationController
- load_and_authorize_resource
- def index
- @caredates = Caredate.accessible_by(current_ability)
- end
- end
Add Comment
Please, Sign In to add comment