Skip to content

Instantly share code, notes, and snippets.

@chewmanfoo
Created March 7, 2011 19:35
Show Gist options
  • Select an option

  • Save chewmanfoo/859055 to your computer and use it in GitHub Desktop.

Select an option

Save chewmanfoo/859055 to your computer and use it in GitHub Desktop.
In a model:
def self.on_time
select {|s| ((s.generally_available_on.blank?) && (Date.today <= s.qa_original_completed_on) || (s.generally_available_on <= s.qa_original_completed_on)}
end
returns an error:
ArgumentError: wrong number of arguments (0 for 1)
from /.../app/models/software_release.rb:102:in `select'
from /.../app/models/software_release.rb:102:in `on_time'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment