1 2 3
def determine_layout %w(index show edit update).include?(params[:action]) ? "application" : "sessions" end
1 2 3 4
#!/usr/bin/env ruby1.8 # # p0wn1e is the hackerspaces.org notifier. ...
Ruby ATOM feed to identi.ca stat...
by hellekin,
September 12, 2009 02:00,
2 refactorings, tagged with ruby, atom, feed, notification, bot, identica, statusnet, twitter
I want to refactor this cod...
1 2 3 4
# Add this to spec/spec_helper.rb # Use as: # check_route_for(:route_name => 'foo', :route_path => '/foo/:bar/baz/:quuq', :controller => 'foo', :action => 'foos', :bar => 'BAR', :quux => 'Moo') ...
1 2 3 4
def interpreted_route_path(path, params) path.gsub(/:([^\/]+)/) { |b| params[$1.to_sym] } end ...

There are a number of probl...