Sha256: 15ceecfbf111ce33b97ca8670c2eb51a681074ffb7883b2cbc506507bd249309

Contents?: true

Size: 611 Bytes

Versions: 6

Compression:

Stored size: 611 Bytes

Contents

module Fuel
  class Author < ActiveRecord::Base

    has_many :posts

    if Rails.version[0].to_i < 4
      attr_accessible :first_name, :last_name, :title, :bio, :avatar, :email, :twitter, :github, :dribbble, :start_date
    end

    def full_name
      [first_name, last_name].compact.join(" ")
    end

    has_attached_file :avatar, :styles => { :medium => Fuel.configuration.avatar_settings[:styles][:medium], :thumb => Fuel.configuration.avatar_settings[:styles][:thumb] }, :default_url => "fuel/default-img.jpg"
    validates_attachment_content_type :avatar, :content_type => /\Aimage\/.*\Z/

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fuel-0.3.27 app/models/fuel/author.rb
fuel-0.3.26 app/models/fuel/author.rb
fuel-0.3.25 app/models/fuel/author.rb
fuel-0.3.24 app/models/fuel/author.rb
fuel-0.3.23 app/models/fuel/author.rb
fuel-0.3.22 app/models/fuel/author.rb