When accessing tasks#index, I get:
wrong number of arguments (0 for 1)
# tasks_controller.rb
@open_tasks = @company.tasks.open.incomplete.includes...
# task.rb
scope :open, lambda {
where("tasks.owner_id IS NULL")
}
By trial and error, I’ve isolated the problem to the :open query shown above. What’s wrong with the code above and why am I missing an argument?
Try to rename the scope, seems Rails does not work with scope
open. http://rudygems.com/post/420138339/rails-3-doesnt-allow-open-as-a-named-scope