My Recent Pastes (38 and counting)
Recent Pasties by robotpoke (38 and counting)
Below are summaries of the 15 most recent pasties by robotpoke.
December 05, 2007
1:57PM EDT
by robotpoke
View more (42 lines)
1 2 3 4 5 |
1) Error: test_should_not_generate_an_error(QueueEntryTest): TypeError: wrong argument type nil (expected Data) /opt/local/lib/ruby/1.8/yaml.rb:387:in `emit' /opt/local/lib/ruby/1.8/yaml.rb:387:in `quick_emit' |
December 01, 2007
4:16PM EDT
by robotpoke
1 2 3 4 5 |
command finished * executing `deploy:start' * executing `mongrel:cluster:start' * executing "sudo -p 'sudo password: ' mongrel_rails cluster::start -C /var/www/apps/rxsuite/current/config/mongrel_cluster.yml" servers: ["dev.rxsuite.net"] |
November 28, 2007
11:25PM EDT
by robotpoke
View more (22 lines)
1 2 3 4 5 |
##sub model, position class Position < ActiveRecord::Base belongs_to :account has_many :users |
November 27, 2007
3:32PM EDT
by robotpoke
View more (25 lines)
1 2 3 4 5 |
def map_attributes(hmap, row) hmap.inject({}) do |return_hash, hash_element| attribute = hash_element[0] value = hash_element[1] if !value["map"].nil? && value["map"].to_s.match(/^\d/) #begins with digit or fk relationship |
November 27, 2007
3:23PM EDT
by robotpoke
View more (21 lines)
1 2 3 4 5 |
#here's the grammar in BNF #dyn ::= <columns> #columns ::= <columns> '+' <column> | <column> #column ::= <numeral> ':' <range> | <numeral> #range ::= <numeral> <range_op> <numeral> | <numeral> |
November 16, 2007
2:34AM EDT
by robotpoke
View
Includes file attachment.
November 16, 2007
2:33AM EDT
by robotpoke
View
Includes file attachment.
November 16, 2007
2:32AM EDT
by robotpoke
View
Includes file attachment.
November 16, 2007
2:29AM EDT
by robotpoke
View
Includes file attachment.
November 16, 2007
2:15AM EDT
by robotpoke
View more (51 lines)
1 2 3 4 5 |
207 def log_entry 208 @log_entry ||= LogEntry.new({:batch_created_on => exec_time}) 209 end 210 def log_entry=(l) 211 @log_entry = l |
September 24, 2007
2:25PM EDT
by robotpoke
View more (46 lines)
1 2 3 4 5 |
<script type="text/javascript"> //all 3 methods requires standard.js, prototype.js //toggle visibility of simple/advanced csv_mapping fields function toggleSimpleAdvanced(integration_column_id) { var simple_link = $("csv_link_simple_" + integration_column_id); |
September 24, 2007
10:10AM EDT
by robotpoke
View more (8 lines)
1 2 3 4 5 |
def validate_not_nil_attributes_of_assoc_klass begin obj ||= self.assoc_klass.new class << obj validates_presence_of :external_id |
September 21, 2007
1:16PM EDT
by robotpoke
View more (8 lines)
1 2 3 4 5 |
def create_integration_columns self.assoc_klass.columns.each { |c| integration_columns.build({:column_name => c.name}) } integration_columns.each do |ic| ic.is_required = true if required_attribute_names_of_associated_klass.include?(ic.column_name) def ic.validate ; end; #bypass validation for this IntegrationColumn instance |
September 21, 2007
11:24AM EDT
by robotpoke
View more (11 lines)
1 2 3 4 5 |
30 def new 31 if params[:integration] 32 debugger 33 @integration = params[:integration][:type].constantize.new({:is_being_created => true}.merge(params[:integration])) 34 @integration_file = @integration.build_integration_file({:is_active => true}.merge(params[:integration_file])) |
September 21, 2007
11:23AM EDT
by robotpoke
View more (222 lines)
1 2 3 4 5 |
ActiveRecord::StatementInvalid in IntegrationsController#new
PGError: ERROR: current transaction is aborted, commands ignored until end of transaction block
: INSERT INTO integration_columns ("default", "integration_id", "csv_map", "column_name", "is_required") VALUES(NULL, NULL, NULL, 'id', NULL)
|
Pastie