I have a model which look like this:
class Question < ActiveRecord::Base
belongs_to :level
def next
Question.first(:conditions => ['id > ? AND level_id = ?', self.id, self.level_id], :order => 'id ASC')
end
end
This worked perfectly fine, until i updated by rails to version 4.1.0. Now i receive this error:
ArgumentError in QuestionsController#answer invalid value for Integer(): "{:conditions=>[\"id > ? AND level_id = ?\""
I can't figure out how to fix this. is it possibly that the rails update is responsible for this problem? I have exactly the same method in another application and that one still works.