Skip to content

Instantly share code, notes, and snippets.

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
function day_elements() {
return $("#group_walk_mon, #group_walk_tue, #group_walk_wed, ...");
}
function uncheckAllDays() {
day_elements().attr('checked', false);
}
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);
}
# Or......
class CommentsController < ApplicationController
def index
@comments = Topic.find(params[:topic_id]).not_shitty_comments
end
end