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
# has_counter_cache_on is a simple ActiveRecord extension | |
# which allows you to have multiple counters for a single | |
# association, counted when simple conditions are met | |
# | |
# The implementation is adapted from the current | |
# add_counter_cache_callbacks code in Rails. | |
# | |
# Example: | |
# | |
# class Submission < ActiveRecord::Base |
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
# Filename: RAILS_ROOT/lib/paperclip_processors/thumbnail_with_dimensions.rb | |
# Required Configuration in the model | |
# has_attached_file :image, | |
# :styles => { | |
# :thumbnail => { | |
# :geometry => "100x100>", | |
# :format => :png, | |
# :processors => [:thumbnail_with_dimensions], | |
# :mystyle => :thumbnail | |
# }, |
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
[~/Projects/OpenSource/roxml (master)⚡] $ ruby spec/load_spec.rb | |
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- roxml (LoadError) | |
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
from spec/load_spec.rb:2 | |
[~/Projects/OpenSource/roxml (master)⚡] $ sudo gem install pkg/roxml-3.1.0.gem | |
Password: | |
Successfully installed roxml-3.1.0 | |
1 gem installed | |
Installing ri documentation for roxml-3.1.0... | |
Installing RDoc documentation for roxml-3.1.0... |
NewerOlder