Created
April 17, 2012 14:38
-
-
Save coderforhire/2406394 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| before_post_process :rename_file | |
| def rename_file | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
class User < ActiveRecord::Base
Include default devise modules. Others available are:
:token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :picture
attr_accessible :title, :body
attr_accessor :picture_file_name
attr_accessor :picture_content_type
attr_accessor :picture_file_size
attr_accessor :picture_updated_at
before_post_process :rename_file
def rename_file
:
end
has_attached_file :picture,
:storage => :s3,
:bucket => ENV['S3_BUCKET_NAME'],
:s3_credentials => S3_CREDENTIALS
end
~
~