Sha256: 0fd7b1ef5098aacde79bda9a825a598dda9a9b3ec5382d629c3d595e40bc6251

Contents?: true

Size: 294 Bytes

Versions: 3

Compression:

Stored size: 294 Bytes

Contents

module RedBase
  class Permission < ActiveRecord::Base

    has_and_belongs_to_many :groups

    def string_repr
      _("can %s %s") % [_(self.permission_type.to_s), self.model.underscore.humanize]
    end

    def id_repr
      "#{self.permission_type.to_s}|#{self.model}"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
red_base-0.6.0 app/models/red_base/permission.rb
red_base-0.5.1 app/models/red_base/permission.rb
red_base-0.5.0 app/models/red_base/permission.rb