Class: TodoLists::Item
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TodoLists::Item
- Defined in:
- lib/todo_lists/models/item.rb
Class Method Summary collapse
Class Method Details
.find_by_index_and_list_id(index:, list_id:) ⇒ Object
5 6 7 |
# File 'lib/todo_lists/models/item.rb', line 5 def self.find_by_index_and_list_id(index:, list_id:) where(:list_id => list_id)[index.to_i-1] end |