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
| # Or...... | |
| class CommentsController < ApplicationController | |
| def index | |
| @comments = Topic.find(params[:topic_id]).not_shitty_comments | |
| end | |
| 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
| function uncheckAllDays() { | |
| $("#group_walk_mon").attr('checked', false); | |
| $("#group_walk_tue").attr('checked', false); | |
| $("#group_walk_wed").attr('checked', false); | |
| $("#group_walk_thu").attr('checked', false); | |
| $("#group_walk_fri").attr('checked', false); | |
| $("#group_walk_sat").attr('checked', false); | |
| $("#group_walk_sun").attr('checked', false); | |
| } |
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
| function day_elements() { | |
| return $("#group_walk_mon, #group_walk_tue, #group_walk_wed, ..."); | |
| } | |
| function uncheckAllDays() { | |
| day_elements().attr('checked', false); | |
| } |
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
| describe "routes to the articles controller" do | |
| extend RouteSpecHelpers | |
| scope_options controller: 'articles', blog: 'my_blog' do | |
| get '/blogs/my_blog/articles/new' => { action: 'new' } | |
| post '/blogs/my_blog/articles' => { action: 'create' } | |
| get '/blogs/my_blog/articles/1' => {action: 'show', id: '1' } | |
| end | |
| 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 ApplicationController < (defined?(Rails) && ActionController::Base || Object) | |
| 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 PrivacyFilter | |
| class << self | |
| def filter(controller) | |
| @controller = controller | |
| first_article?(controller) or administrator?(controller) or user?(controller) | |
| end | |
| def first_article?(controller) | |
| controller.params[:id] == 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
| describe "#mentions_story?" do | |
| subject { described_class.new(file) } | |
| let(:file) { "COMMIT_EDITMSG" } | |
| before do | |
| File.stub(:read).with(file) { example_commit_message(@relevant_part) } | |
| end | |
| context "commit message contains the special Pivotal Tracker story syntax" do | |
| it "matches just the number" do | |
| @relevant_part = "[#8675309]" |
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
| use Rack::Static, | |
| urls: { | |
| '/': 'index.html' | |
| }, | |
| root: 'public' | |
| run Rack::URLMap.new({ | |
| '/': Rack::Directory.new('public') | |
| }) |
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
| <?php | |
| $this->path = BASE_FOLDER . '/x/y/z'; | |
| if (file_exists($this->path)) { | |
| $objects = new RecursiveIteratorIterator ( | |
| new RecursiveDirectoryIterator($this->path), | |
| RecursiveIteratorIterator::SELF_FIRST); | |
| $directories = array(0 => $this->path); |
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 EmailJob | |
| include SuckerPunch::Job | |
| def perform(user_id) | |
| UserMailer.welcome(user_id).deliver | |
| end | |
| end | |
| module SuckerPunch | |
| module Job |
OlderNewer