My Recent Pastes (547 and counting)
Recent Pasties by rsl (547 and counting)
Below are summaries of the 15 most recent pasties by rsl.
April 02, 2009
5:58PM EDT
by rsl
View more (14 lines)
1 2 3 4 5 |
class Foo has_many :bars end class Bar |
April 02, 2009
4:50PM EDT
by rsl
View more (22 lines)
1 2 3 4 5 |
before_filter :set_site after_filter do |c| c.class.page_cache_directory = c.site.directory_for(:cache) end |
February 28, 2009
3:13PM EDT
by rsl
1 2 3 4 |
<% form_for @post do |f| %> <%= f.text_area :contents %> <%= submit_tag "Submit" %> <% end %> |
February 27, 2009
6:28PM EDT
by rsl
View more (7 lines)
1 2 3 4 5 |
ad = Ad.create( :middle_leaderboard => " <iframe id='x3113' name='x3113' src='http://d1.openx.org/afr.php?n=a76aab5d&zoneid= x3113&cb=<%= -%>' framespacing='0' frameborder='no' scrolling='no' width='728' height='90'><a href='http://d1.openx.org/ck.php?n= x3113&cb=<%= random_number_function -%>' target='_blank'><img src='http://d1.openx.org/avw.php?zoneid=22614&cb=#{ random_number_function}&n= x3113' border='0' alt='' /></a></iframe> <script type='text/javascript' src='http://d1.openx.org/ag.php'></script>" ) |
February 27, 2009
3:11PM EDT
by rsl
1 2 3 4 5 |
# ActionMailer configuration config.action_mailer.delivery_method = :sendmail config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.default_charset = "utf-8" |
December 16, 2008
3:49PM EDT
by rsl
View more (44 lines)
1 2 3 4 5 |
## config/environment.rb [in initializer loop] if Rails.env.production? config.after_initialize do port = RAILS_ENV == "production" ? 11300 : 11310 AsyncObserver::Queue.queue = Beanstalk::Pool.new(["localhost:#{port}"]) |
December 11, 2008
4:55PM EDT
by rsl
View more (7 lines)
1 2 3 4 5 |
## in console >> s = Site.first >> s.entries.live ## in logs Site Load (0.5ms) SELECT * FROM `sites` LIMIT 1 |
September 17, 2008
5:13PM EDT
by rsl
View more (50 lines)
1 2 3 4 5 |
module DateWithOptionalTime module ActiveRecord module Base def self.included(base) |
September 17, 2008
4:49PM EDT
by rsl
View more (33 lines)
1 2 3 4 5 |
module Bar def self.included(base) base.extend ClassMethods end |
September 17, 2008
4:32PM EDT
by rsl
View more (51 lines)
1 2 3 4 5 |
module DateWithOptionalTime module ActiveRecord module Base def self.included(base) |
September 17, 2008
4:23PM EDT
by rsl
View more (43 lines)
1 2 3 4 5 |
module DateWithOptionalTime module ActiveRecord module Base def self.included(base) |
September 17, 2008
4:11PM EDT
by rsl
View more (34 lines)
1 2 3 4 5 |
> class Foo def initialize @foo = "foo" end def foo |
September 17, 2008
12:08PM EDT
by rsl
View more (12 lines)
1 2 3 4 5 |
namespace :deploy do task :after_update_code, :roles => [:app, :db, :web] do symlink_sphinx_indexes end |
September 17, 2008
11:25AM EDT
by rsl
View more (13 lines)
1 2 3 4 5 |
require File.dirname(__FILE__) + '/../spec_helper' describe UsersController do describe "when not logged in" do it "should redirect all requests to the login page" do |
September 17, 2008
11:19AM EDT
by rsl
View more (9 lines)
1 2 3 4 5 |
describe PostsController do fixtures :all it "should raise an error here" do lambda { |
Pastie