Sha256: 59a1aa57e9b28035984264ee2aca010e193fccdef960c5ecd76b3bd442fab5fa
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
module Kblog class Article < ActiveRecord::Base attr_accessible :content, :title validates :title, :presence => true def self.has_create_rights(user) case Kblog.auth_type when 'basic' false when 'role' user.respond_to?(:roles) && user.roles.map { |r| r.name }.includes?( Kblog.auth_role ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kblog-0.0.1 | app/models/kblog/article.rb |