This file contains 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
//To fetch a branch, you simply need to: | |
git fetch origin | |
//This will fetch all of the remote branches for you. With the remote branches | |
//in hand, you now need to check out the branch you are interested in, giving | |
//you a local working copy: | |
git checkout -b test origin/test |
This file contains 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
# Model using the ghostscript processor | |
class Content < ActiveRecord::Base | |
has_attached_file :resource, | |
:styles => { :preview => ["725x1200>", :jpg], :thumb => ["100x140>", :jpg] }, | |
:processors => [:ghostscript, :thumbnail], | |
:convert_options => { :all => '-colorspace RGB -flatten -density 300 -quality 100' }, | |
:path => ":page_path/:class/:id/:resource_token/:style/:filename" | |
end |