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
Page ------------> Page Part | |
as is | |
+ master_page_id | |
+ locale | |
Page has many Page |
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
def url(geometry = nil) | |
unless ::Refinery.s3_backend | |
if geometry.present? | |
"#{self.image.thumb(geometry).url}#{self.image_uid.split('/').last}" | |
else | |
(self.image.url.split('/')[0..-2] | [self.image_uid]).join('/') | |
end | |
else | |
geometry.present? ? self.image.thumb(geometry).url : self.image.url | |
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
# How to re-use the menu partial for a submenu in Refinery CMS >= 0.9.8.5 and < 0.9.9.22 | |
# header menu (main menu) which hides its children. | |
<%= render :partial => "/shared/menu", | |
:locals => { | |
:dom_id => 'menu', | |
:css => 'menu', | |
:collection => @menu_pages, | |
:hide_children => true | |
} -%> |
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 update engineyard | |
Updating installed gems | |
Updating engineyard | |
Successfully installed engineyard-serverside-adapter-1.3.3 | |
Successfully installed engineyard-1.3.1 | |
Gems updated: engineyard-serverside-adapter, engineyard | |
Installing ri documentation for engineyard-serverside-adapter-1.3.3... | |
Installing ri documentation for engineyard-1.3.1... | |
Installing RDoc documentation for engineyard-serverside-adapter-1.3.3... | |
Installing RDoc documentation for engineyard-1.3.1... |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'socket' | |
require 'octopi' | |
include Octopi | |
COMPETITORS = { | |
'refinery' => "resolve/refinerycms", | |
'radiant' => "radiant/radiant", |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3-ruby', :require => 'sqlite3' | |
# Use unicorn as the web 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
# Absurd. Who else sees things like this? Why is it loading them twice? | |
Slug Load (0.4ms) SELECT "slugs".* FROM "slugs" WHERE ("slugs"."sluggable_id" IN (2,1,3,11,4,5,6,7,8,9,10) and "slugs"."sluggable_type" = 'TripGroup') ORDER BY id DESC | |
Slug Load (0.1ms) SELECT "slugs".* FROM "slugs" WHERE ("slugs".sluggable_id = 2 AND "slugs".sluggable_type = 'TripGroup') ORDER BY id DESC LIMIT 1 | |
Slug Load (0.1ms) SELECT "slugs".* FROM "slugs" WHERE ("slugs".sluggable_id = 1 AND "slugs".sluggable_type = 'TripGroup') ORDER BY id DESC LIMIT 1 | |
Slug Load (0.1ms) SELECT "slugs".* FROM "slugs" WHERE ("slugs".sluggable_id = 3 AND "slugs".sluggable_type = 'TripGroup') ORDER BY id DESC LIMIT 1 | |
Slug Load (0.1ms) SELECT "slugs".* FROM "slugs" WHERE ("slugs".sluggable_id = 11 AND "slugs".sluggable_type = 'TripGroup') ORDER BY id DESC LIMIT 1 | |
Slug Load (0.1ms) SELECT "slugs".* FROM "slugs" WHERE ("slugs".sluggable_id = 4 AND "slugs".sluggable_type = 'TripGroup') ORDER BY id DESC LIMIT 1 | |
Slug Load (0.1ms) SELECT "sl |
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
// This is why we moved from prototype to jQuery | |
FastInit.addOnLoad(function() | |
{ | |
$$('#body_content_left_content', '#body_content_right_content').each(function(content){ | |
// it's okay if the first and last descendant are the same | |
descendants = content.descendants().select(function(d){return d.tagName == "P"}) | |
if ((first_descendant = descendants.first()) != null) { first_descendant.addClassName('first_paragraph'); } | |
if ((last_descendant = descendants.last()) != null) { last_descendant.addClassName('last_paragraph'); } | |
}); |
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
When running Dragonfly's features using rails 3.0.2 specified in the Gemfile. | |
*** RUNNING FEATURES IN THE RAILS APP... *** | |
Using the default profile... | |
..F---- | |
(::) failed steps (::) | |
Dragonfly::TempObject must be initialized with a String, a File, a Tempfile, or another TempObject (ArgumentError) | |
/code/dragonfly/lib/dragonfly/temp_object.rb:179:in `initialize_from_object!' |