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
| Name: Performance#description should replace an obscene description with an innocent one | |
| Type: Failure Message: | |
| expected: "Me performing care bear on my teddy", | |
| got: "Me performing cunillingus on my teddy" | |
| Name: Performance#title should replace an obscene title with an innocent one | |
| Type: Failure Message: | |
| expected: "care bear", | |
| got: "fingerfuckers" (using ==) ./spec/wired/app/models/performance_spec.rb:763: | |
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
| beans = [:arabica, :robusta] | |
| beans.reject { |type| type == :robusta } | |
| beans.flatten! | |
| beans.compact! | |
| espresso = beans.inject(:steam) {} | |
| frapuccino = ([[:milk]] << [espresso]).freeze | |
| frapuccino.take_while { |cup| !cup.empty? } |
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
| <emotionml xmlns="http://www.w3.org/2009/10/emotionml" | |
| xmlns:classifiers="http://www.example.com/meta/classify/" | |
| xmlns:origin="http://www.example.com/meta/local/" | |
| category-set="http://www.example.com/emotion/category/everyday-emotions.xml"> | |
| <info> | |
| <classifiers:classifier classifiers:name="GMM"/> | |
| </info> | |
| <emotion> | |
| <intensity value="1"/> |
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
| class FbappController < ApplicationController | |
| helper :google_optimizer | |
| skip_before_filter :invitation_or_login_required, :only => [:index] | |
| layout 'fb_app' | |
| def index | |
| if @user | |
| return redirect_to '/fb_error' | |
| end |
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
| class InviteController < ApplicationController | |
| helper :google_optimizer, :content, :competitions, :deals | |
| include ContentHelper | |
| skip_before_filter :invitation_or_login_required, :only => [ :index, :invite_deal, :invite_competition] | |
| def index | |
| ######################################### | |
| ## Generic links |
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
| <p> | |
| <span class="black-txt"><b>Programme Benefits</b></span><br /> | |
| <span class="black-txt">• High conversion rate and average spend (£77) per customer</span><br /> | |
| <span class="black-txt">• Fantastic widget feeds and creatives to display on your website</span><br /> | |
| <span class="black-txt">• Comprehensive Affiliate management from 7thingsmedia</span><br /> | |
| </p> | |
| <p> | |
| <span class="black-txt">• £2.50 fixed fee commission for first customer sales</span><br /> | |
| <span class="black-txt">• 10% commission of sale value on first customer sales</span><br /> |
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
| >> d.wordpress_deal.merchant_value | |
| => 37.05 | |
| >> d.wordpress_deal.merchant_value * 100 | |
| => 3705.0 | |
| >> (d.wordpress_deal.merchant_value * 100).to_i | |
| => 3704 | |
| >> |
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
| # Rails 2 routing | |
| # | |
| map.resource :city, :as => ":city" do |city| | |
| city.login 'login', :controller => 'cities', :action => 'login' | |
| city.resources :orders, :only => [ :show, :update ] | |
| end | |
| # city_login /:city/login {:controller=>"cities", :action=>"login"} | |
| # | |
| # city_order GET /:city/orders/:id(.:format) {:controller=>"orders", :action=>"show"} |
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
| In a mounted engine with | |
| isolate_namespace Foo | |
| A Foo::BarController#index action looks for it's template in app/views/foo/bar/index.html.erb | |
| However if I'm in that index template and do | |
| render :partial => 'bar/baz' |
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
| class Hello | |
| def self.first | |
| puts "Boo!" | |
| end | |
| private | |
| def self.second | |
| puts "Buh!" | |
| end |
OlderNewer