Sha256: d9ed8a5f8cf0d8895b56c2a8125ff92b5887413ec698621950121542830a0bde

Contents?: true

Size: 549 Bytes

Versions: 2

Compression:

Stored size: 549 Bytes

Contents

module BlogBasic
  class User < ActiveRecord::Base

    attr_accessible :identifier_url
    before_save :default_values
  

    def default_values
        self.status ||= BlogBasic::BlogConf.data['name']
    end

    ## To be deleted
    #def self.create_with_omniauth(auth)
    #  create! do |user|
    #    user.provider = auth["provider"]
    #    user.uid = auth["uid"]
    #    user.name = auth["user_info"]["name"]
    #  end
    #end

    #def admin?
    #  !self.identifier_url.nil?
    #end

    def name
      self.name
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blog_basic-0.1.14 app/models/blog_basic/user.rb
blog_basic-0.1.13 app/models/blog_basic/user.rb