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
# Custom types are scoped to a particular site instance, | |
# so their class names are suffixed with the site ID. | |
# This also helps Content#const_missing figure out when we're | |
# trying to load a custom type, because it gets numbers at the | |
# end of the class name. | |
# Note: I've put some validation logic in CustomType to ensure | |
# that the name in the database is a valid Ruby constant name. | |
# new_custom_type = Content::CustomType.create(:site_id => 1, :name => "My custom type") | |
# Content::MyCustomType1 #=> Content::MyCustomType1(...) |
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
demolicious/ | |
|-- LICENSE | |
|-- README | |
|-- page_layouts | |
| |-- config.yml | |
| |-- homepage.erb.html | |
| `-- locale.yml | |
|-- images | |
|-- stylesheets | |
`-- views |
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
<% | |
css = [] | |
css << "selected" if selected_page?(menu_branch) or descendant_page_selected?(menu_branch) | |
css << "first" if menu_branch_counter == 0 | |
css << "last" if menu_branch_counter == (sibling_count ||= menu_branch.shown_siblings.size) | |
domid = "item_#{menu_branch_counter}" unless menu_branch.parent_id.present? or menu_branch.title.blank? | |
-%> | |
<% if menu_branch.in_menu? %> | |
<li<%= " class='#{css.join(' ')}'" if css.present? -%><%= " id='#{domid}'" if domid.present? -%>> | |
<%= link_to menu_branch.title, menu_branch.url %> |
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
Page ------------> Page Part | |
as is | |
+ master_page_id | |
+ locale | |
Page has many Page |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'socket' | |
require 'octopi' | |
include Octopi | |
COMPETITORS = { | |
'refinery' => "resolve/refinerycms", | |
'radiant' => "radiant/radiant", |
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
#!/usr/bin/env ruby | |
# | |
# A quick script to dump an overview of all the open issues in all my github projects | |
# | |
require 'octokit' | |
require 'awesome_print' | |
require 'rainbow' |
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
rendering a custom plugin | |
<% content_for :page_title do %> | |
<%= @destination.title %> | |
<% end %> | |
<% content_for :page_body do %> | |
<section> | |
<h1>Choose from our most popular recommended itineraries below</h1> | |
</section> |
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
require 'spec_helper' | |
module Refinery | |
describe Page do | |
let(:page) do | |
Page.create!({ | |
:title => 'RSpec is great for testing too', | |
:deletable => true | |
}) |
OlderNewer