This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def save | |
| numbers_not_zero? ? super : false | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Latest Bundler | |
| source 'http://gemcutter.org' | |
| gem 'rails', '3.0.0.beta3', :git => "git://github.com/rails/rails.git" | |
| #:path => "/Users/chris/projects/open_source/rails" | |
| gem 'pg' | |
| gem 'haml' | |
| gem "authlogic", :git => "git://github.com/bpokosh/authlogic.git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Job failed to load: undefined method `keys' for nil:NilClass. Try to manually require the required file. (Delayed::Backend::DeserializationError) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def last_sunday_of_last_month | |
| month = 1.month.ago | |
| days = month.end_of_month.mday | |
| date = Date.new(month.year, month.month, days) | |
| Date.new(month.year, month.month, (days - date.wday)) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| And I select Next Month from "fieldname" do |arg1| | |
| month = 1.month.from_now.strftime("%B") | |
| select(month, :from => arg1) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://skitch.com/railsninja/n4xi5/job-futures | |
| Above Url is the interface for the numbers I am trying to pull, Fuck me I have no idea how to try and explain this simply, we have been mindfucking this here for ages | |
| 1. Is from a table called placement_scores which needs to have numbers from the latest month, period_ending field (date) | |
| 2. Is also from a table placement_scores but needs to aggregate numbers from the 3 months prior to the latest month | |
| 3. Is from a table called outcome_scores which needs to aggregate numbers from between 7 months and 5 months prior using a period_ending value as well | |
| Now have this: | |
| find_by_sql( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| And I press "login-button" | |
| You have a nil object when you didn't expect it! | |
| You might have expected an instance of Array. | |
| The error occurred while evaluating nil.each | |
| <fieldset id="options"> | |
| <p><%=link_to "Forgot Password?", {:controller => "auth", :action => 'password_recovery'} %></p> | |
| <%= image_submit_tag "buttonLoginGo.jpg", :id => "login-button" %> | |
| <p><%= link_to "New User?", :action => 'new_user' %></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $cd ~/src | |
| $ curl -O http://ftp2.au.postgresql.org/pub/postgresql/v8.4.2/postgresql-8.4.2.tar.bz2 | |
| $ tar xzvf postgresql-8.4.2.tar.bz2 | |
| $ cd postgresql-8.4.2.tar.bz2 | |
| $ ./configure | |
| $ make | |
| $ sudo make install | |
| $ echo 'export PATH=/usr/local/pgsql/bin:$PATH' >> ~/.bashrc | |
| $ echo 'export MANPATH=/usr/local/pgsql/man:$MANPATH' >> ~/.bashrc | |
| $ . ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Factory girl, relaxed. | |
| # | |
| # Factory.define :user do |f| | |
| # f.login 'johndoe%d' # Sequence. | |
| # f.email '%{login}@example.com' # Interpolate. | |
| # f.password f.password_confirmation('foobar') # Chain. | |
| # end | |
| # | |
| # Factory.define :post do |f| | |
| # f.user { Factory :user } # Blocks, if you must. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Edit this Gemfile to bundle your application's dependencies. | |
| ## Bundle edge rails: | |
| gem "rails", :git => "git://github.com/rails/rails.git" | |
| ## Bundle the gems you use: | |
| # gem "bj" | |
| # gem "hpricot", "0.6" | |
| # gem "sqlite3-ruby", :require_as => "sqlite3" | |
| # gem "aws-s3", :require_as => "aws/s3" |