class User < ActiveRecord::Base
  has_and_belongs_to_many :roles
  has_many :aliases, :dependent => :destroy
  has_many :addresses, :as => :addressable

  validates_presence_of :first_name, :last_name
  file_column :photo, :magick => { 
    :versions => {
      :thumb => {:size => "40x40"} 
    } 
  }
  
  def name
    last_name.nil? ? first_name : first_name + " " + last_name
  end

end

class User < ActiveRecord::Base
  has_and_belongs_to_many :roles
  has_many :aliases, :dependent => :destroy
  has_many :addresses, :as => :addressable

  validates_presence_of :first_name, :last_name
  file_column :photo#, :magick => { 
  #   :versions => {
  #     :thumb => {:size => "40x40"} 
  #   } 
  # }
  
  def name
    last_name.nil? ? first_name : first_name + " " + last_name
  end

end

Include fille_column and bridge in externals. Comment out the :magick hash so the RMagick is an optional dependency.
Include fille_column and bridge in externals. Comment out the :magick hash so the RMagick is an optional dependency.

git-svn-id: b6390d97d9ded5bc793696aad9e4256efc0f90b3@579 561dde7e-7729-0410-be8e-ef83869d6c7d
