Skip to content

Instantly share code, notes, and snippets.

View fivetwentysix's full-sized avatar
💭
yet another programmer

Patrick Ma fivetwentysix

💭
yet another programmer
View GitHub Profile
x 207313230.csv"Report Name: AdPerformanceReport_01_14_2013_12_11_12"
"Report Time: 2013"
"Time Zone: (GMT-08:00) Pacific Time (US & Canada); Tijuana"
"Last Completed Available Day: 1/14/2013 5:00:00 AM (GMT)"
"Last Completed Available Hour: 1/14/2013 5:00:00 AM (GMT)"
"Report Aggregation: Yearly"
"Report Filter: "
"Potential Incomplete Data: true"
"Rows: 0"
def options_from_hashes_for_select(hashes, value, display, selected=nil)
attributes = 'attr_accessor ' + hashes.first.map do |key, value|
"#{key.downcase.to_sym.inspect}"
end.join(', ')
eval <<-RUBY
class X
#{attributes}
end
RUBY
def approve
@payment.approve(current_user)
flash[:success] = "The payment has been approved."
if @payment.payment_requests.any?
redirect_to accounting_payment_requests_path
else
redirect_to payments_path(stage: "requisitions")
end
end
describe Item
describe "#received" do
it "should return the amount of goods received" do
receiving_records = mock_model(ReceivingRecord)
subject.stub(:receiving_records) { receiving_records }
receiving_records.stub(:sum).with(:quantity) { 3 }
subject.received.should == 3
end
end
end
require 'spec_helper'
describe "layouts/application.html.haml" do
it "should not render the current user" do
render
rendered.should_not have_selector("#current_user")
end
it "should render the current user when signed in" do
login_user(Factory(:user))
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
WARNING: Can't mass-assign protected attributes: weekday, starting_time, closing_time
class WorkDay < ActiveRecord::Base
belongs_to :employment_datum
default_scope :order => "weekday ASC"
attr_accessor :starting_time
attr_accessor :closing_time
attr_accessible [:starting_time, :closing_time, :weekday, :work_days_attributes]
[ pid=19462 thr=68395580 file=utils.rb:176 time=2011-10-06 10:12:03.963 ]: *** Exception PGError in application (server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
) (process 19462, thread #<Thread:0x00000008274478>):
from /home/pma/www/BOSS/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:276:in `exec'
from /home/pma/www/BOSS/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:276:in `block in clear_cache!'
from /home/pma/www/BOSS/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:275:in `each_value'
from /home/pma/www/BOSS/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:275:in `clear_cache!'
from /home/pma/www/BOSS/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.0/lib/active_record/conne
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
ERROR: parameter "standard_conforming_strings" cannot be changed
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
ERROR: parameter "standard_conforming_strings" cannot be changed
ERROR: parameter "standard_conforming_strings" cannot be changed
ERROR: parameter "standard_conforming_strings" cannot be changed
LOG: unexpected EOF on client connection
LOG: unexpected EOF on client connection
ERROR: parameter "standard_conforming_strings" cannot be changed
LOG: unexpected EOF on client connection