Skip to content

Instantly share code, notes, and snippets.

View jaytho's full-sized avatar

jay thompson jaytho

  • zoran
  • plano,texas
View GitHub Profile
def path_to_attachment_image(attachment)
image_path("attachments/#{attachment.filename}")
end
class User < ActiveRecord::Base
has_attached_file :avatar, :styles => {:thumb => '100x100>'}
end
###########
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :avatar_file_name