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
| def path_to_attachment_image(attachment) | |
| image_path("attachments/#{attachment.filename}") | |
| end |
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
| 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 |