diff options
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/discussion.rb | 2 | ||||
| -rw-r--r-- | app/models/inboxes/ability.rb | 38 |
2 files changed, 0 insertions, 40 deletions
diff --git a/app/models/discussion.rb b/app/models/discussion.rb index 675547d..6df0b1d 100644 --- a/app/models/discussion.rb +++ b/app/models/discussion.rb @@ -2,8 +2,6 @@ class Discussion < ActiveRecord::Base attr_accessor :recipient_tokens, :recipient_ids attr_reader :recipient_ids - # paginates_per 10 - # creater has_many :messages, :dependent => :destroy diff --git a/app/models/inboxes/ability.rb b/app/models/inboxes/ability.rb deleted file mode 100644 index deb3d81..0000000 --- a/app/models/inboxes/ability.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Implementation class for Cancan gem. Instead of overriding this class, consider adding new permissions -# using the special +register_ability+ method which allows extensions to add their own abilities. -# -# See http://github.com/ryanb/cancan for more details on cancan. -module Inboxes - class Ability - include CanCan::Ability - - class_attribute :abilities - self.abilities = Set.new - - # Allows us to go beyond the standard cancan initialize method which makes it difficult for engines to - # modify the default +Ability+ of an application. The +ability+ argument must be a class that includes - # the +CanCan::Ability+ module. The registered ability should behave properly as a stand-alone class - # and therefore should be easy to test in isolation. - def self.register_ability(ability) - self.abilities.add(ability) - - end - - def initialize(user) - # raise "Initializing 3rd patry" - # self.clear_aliased_actions - - # can [:index, :create], Discussion - # can :read, Discussion do |discussion| - # discussion.can_participate?(user) - # end - - #include any abilities registered by extensions, etc. - - Ability.abilities.each do |clazz| - ability = clazz.send(:new, user) - @rules = rules + ability.send(:rules) - end - end - end -end |
