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
# Place this in the config block on config/application.rb of your Rails application. | |
# Override where dragonfly keeps your images and its url format | |
config.to_prepare do | |
::Dragonfly[:images].configure do |c| | |
c.datastore.root_path = Rails.root.join('public', 'assets', 'images').to_s | |
c.url_format = '/assets/images/:job/:basename.:format' | |
end | |
end |
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
# put in config/application.rb | |
config.to_prepare do | |
::PagesController.module_eval do | |
caches_page :show, :unless => proc {|c| c.user_signed_in? || c.flash.any? } | |
caches_page :home, :unless => proc {|c| c.user_signed_in? || c.flash.any? } | |
end | |
::Page.module_eval do | |
after_save :clear_static_caching! | |
after_destroy :clear_static_caching! |
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
ERROR: While executing gem ... (Gem::DependencyError) | |
Unable to resolve dependencies: activeresource requires activesupport (= 3.0.10), activemodel (= 3.0.10); activerecord requires activesupport (= 3.0.10), activemodel (= 3.0.10), arel (~> 2.0.10); rails requires activesupport (= 3.0.10); railties requires activesupport (= 3.0.10); globalize3 requires activemodel (>= 3.0.0); mail requires activesupport (>= 2.3.6), i18n (>= 0.4.0); actionpack requires activesupport (= 3.0.10), activemodel (= 3.0.10), builder (~> 2.1.2), i18n (~> 0.5.0) |
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
[user] | |
name = Your Name | |
email = [email protected] | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow |
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
0: install open source gcc "standalone" using OSX installer: | |
https://github.com/kennethreitz/osx-gcc-installer | |
1: install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
2: install rvm | |
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
MAKE SURE you follow the instructions about putting stuff in ~/.bashrc or ~/.bash_profile |
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
$ rake routes | grep pe | |
refinery_people GET /people(.:format) {:action=>"index", :controller=>"refinery/people"} | |
refinery_person GET /people/:id(.:format) {:action=>"show", :controller=>"refinery/people"} | |
update_positions_refinery_admin_people POST /refinery/people/update_positions(.:format) {:action=>"update_positions", :controller=>"refinery/admin/people"} | |
refinery_admin_people GET /refinery/people(.:format) {:action=>"index", :controller=>"refinery/admin/people"} | |
POST /refinery/people(.:format) {:action=>"create", :controller=>"refinery/admin/people"} | |
new_refinery_admin_person GET /refinery/people/new(.:format) {:action=>"new", :controller=>"refinery/admin/people"} | |
edit_refinery_admin_person GET |
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
<%= render 'shared/menu', :roots => @menu_pages.select{|p| p.parent_id == @page.id} %> |
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
gem install rails | |
rails new my_application_name -m https://raw.github.com/resolve/refinerycms/master/templates/refinery/edge.rb | |
cd my_application_name | |
rails server |
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
if defined?(Bundler) | |
# If you precompile assets before deploying to production, use this line | |
# Bundler.require *Rails.groups(:assets => %w(development test)) | |
# If you want your assets lazily compiled in production, use this line | |
Bundler.require(:default, :assets, Rails.env) | |
end |