My Recent Pastes (38 and counting)
Recent Pasties by robotpoke (38 and counting)
Below are summaries of the 8 most recent pasties by robotpoke.
September 05, 2007
11:26AM EDT
by robotpoke
View more (10 lines)
1 2 3 4 5 |
namespace :utils do desc "Process uploaded files" task :process_files do puts "process uploaded files" all_cust_files = CustFile.find :all |
August 30, 2007
2:19PM EDT
by robotpoke
View more (9 lines)
1 2 3 4 5 |
#put this in a custom rake file in lib/tasks; you probably want to change the paths and db :) Rake::Task["db:schema:load"].instance_variable_get(:@actions)[0] = lambda do if defined?(ActiveRecord::Base) && !ActiveRecord::Base.configurations.blank? `psql lms_test < /opt/local/share/postgresql82/contrib/tsearch2.sql` |
August 09, 2007
8:51AM EDT
by robotpoke
View more (12 lines)
1 2 3 4 5 |
Loaded suite /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader Started E Finished in 1.716641 seconds. |
August 09, 2007
8:49AM EDT
by robotpoke
View more (12 lines)
1 2 3 4 5 |
Loaded suite /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader Started E Finished in 1.716641 seconds. |
August 08, 2007
5:24PM EDT
by robotpoke
View more (9 lines)
1 2 3 4 5 |
>> c.send("validate_integration_sub_class_creation") NoMethodError: undefined method `errors' for "Course type 'crap' does not exist":String from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/validations.rb:13:in `initialize' from ./script/../config/../config/../app/models/course.rb:28:in `exception' from ./script/../config/../config/../app/models/course.rb:28:in `raise' |
August 01, 2007
1:39PM EDT
by robotpoke
View more (9 lines)
1 2 3 4 5 |
>> log
=> {1=>"hey"}
>> UserIntegration.find(:all)
=> []
>> UserIntegration.expects(:find).with("1").returns(log)
|
July 20, 2007
4:04PM EDT
by robotpoke
View more (11 lines)
1 2 3 4 5 |
61 def comp_helper(column, range) 62 m = range.match(/(.)[,|..](.))/) 63 return column[range] if m.nil? 64 65 first = m[1].to_i |
March 11, 2007
10:22AM EDT
by robotpoke
View more (7 lines)
1 2 3 4 5 |
class CustFile < ActiveRecord::Base belongs_to :customer has_attachment :storage => :file_system, :max_size => 100.megabytes |
Pastie