mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-21 14:44:07 +01:00
another set of dynamic finder migrations. All non-cucumber tests pass
This commit is contained in:
parent
64a198d45a
commit
ef91dd0c64
18 changed files with 66 additions and 66 deletions
|
|
@ -15,7 +15,7 @@ class User < ActiveRecord::Base
|
|||
:order => 'position ASC',
|
||||
:dependent => :delete_all do
|
||||
def find_by_params(params)
|
||||
find_by_id(params['id'] || params['context_id']) || nil
|
||||
find(params['id'] || params['context_id']) || nil
|
||||
end
|
||||
def update_positions(context_ids)
|
||||
context_ids.each_with_index {|id, position|
|
||||
|
|
@ -29,7 +29,7 @@ class User < ActiveRecord::Base
|
|||
:order => 'projects.position ASC',
|
||||
:dependent => :delete_all do
|
||||
def find_by_params(params)
|
||||
find_by_id(params['id'] || params['project_id'])
|
||||
find(params['id'] || params['project_id'])
|
||||
end
|
||||
def update_positions(project_ids)
|
||||
project_ids.each_with_index {|id, position|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue