Sha256: 251481bc378689cdf175acc66a7ef8da3e0e4206a2fe2f69a4e22c576030de22
Contents?: true
Size: 373 Bytes
Versions: 3
Compression:
Stored size: 373 Bytes
Contents
module Kblog class Article < ActiveRecord::Base attr_accessible :content, :title validates :title, :presence => true def self.user_rights(user) case Kblog.auth_type when 'basic' true when 'role' user.respond_to?(:roles) && user.roles.map { |r| r.to_s }.include?( Kblog.auth_role ) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kblog-0.0.4 | app/models/kblog/article.rb |
kblog-0.0.3 | app/models/kblog/article.rb |
kblog-0.0.2 | app/models/kblog/article.rb |