-
The -j option of the application generator accepts an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". As of this writing "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. Default is "jquery". [fxn]
-
jQuery is no longer vendored, it is provided from now on by the jquery-rails gem. [fxn]
-
Prototype and Scriptaculous are no longer vendored, they are provided from now on by the prototype-rails gem. [fxn]
-
The scaffold controller will now produce SCSS file if Sass is available [Prem Sichanugrist]
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
class Dog | |
def initialize(name) | |
@name = name | |
end | |
def bark | |
"#{@name} barks like a dog" | |
end | |
def eat |
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
class Granny | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
end | |
class Conversation | |
attr_reader :grannys |
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
# features/refinery/manage_files | |
Scenario: Files Delete | |
Given I have no files | |
When I upload the file at "features/uploads/refinery_is_awesome.txt" | |
And I go to the list of files | |
And I follow "Remove this file forever" | |
Then I should have 0 file | |
# next line fails ... | |
# And I should see "'refinery_is_awesome.txt' was successfully destroyed." |
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
# /refinerycms/vendor/refinerycms/images/app/views/admin/images/_form.html.erb | |
<%#= f.error_messages %> | |
<%= render "/shared/admin/error_messages", :object => @image %> | |
# /refinerycms/vendor/refinerycms/core/app/views/shared/admin/_error_messages.html.erb | |
<% if object.errors.any? %> | |
<div class="errorExplanation" id="errorExplanation"> | |
<p><%= pluralize(object.errors.count, "error") %> prohibited this resource from being saved:</p> | |
<ul> |
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
= Setup | |
=== In your browser | |
login to http://github.com | |
go to http://github.com/resolve/refinerycms | |
if you have a fork already, delete it (if you're not going to loose work. This makes it much easier for us to integrate your changes back in) | |
click on fork | |
=== In terminal | |
git clone git@github.com:USERNAME/refinerycms.git refinerycms |
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 app; | |
worker_processes 2; | |
error_log /home/app/logs/nginx.error.log info; | |
events { | |
worker_connections 1024; | |
} | |
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
Benchmark.bmbm do |x| | |
x.report("each") do | |
count = 0 | |
self.posts.each do |p| | |
count += 1 if p.live? | |
end | |
count | |
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
source 'http://rubygems.org' | |
gem 'rails', '~> 3.0.4' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem '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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |