Ticket #35330

find(:all) is deprecated

Open Date: 2015-07-19 15:44 Last Update: 2015-07-19 15:44

Reporter:
Owner:
(None)
Type:
Status:
Open
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

Details

- converted deprecated find(:all) - removed unused finds

root@istakibi-prod-hosting:/usr/share/redmine/plugins/redmine_information# svn diff Index: app/controllers/info_controller.rb

--- app/controllers/info_controller.rb (revision 57) +++ app/controllers/info_controller.rb (working copy) @@ -26,19 +26,17 @@

@workflow_counts = wfclass.count_by_tracker_and_role @workflow_all_ng_roles = find_all_ng_roles(@workflow_counts)

- @roles = Role.find(:all, :order => 'builtin, position')

@role = Role.find_by_id(params[:role_id])

- @trackers = Tracker.find(:all, :order => 'position')

@tracker = Tracker.find_by_id(params[:tracker_id]) if @tracker && @tracker.issue_statuses.any?
@statuses = @tracker.issue_statuses
end

- @statuses ||= IssueStatus.find(:all, :order => 'position') + @statuses ||= IssueStatus.order('position')

if (@tracker && @role && @statuses.any?)

- workflows = wfclass.all(:conditions => {:role_id => @role.id, :tracker_id => @tracker.id}) + workflows = wfclass.where(:role_id => @role.id, :tracker_id => @tracker.id)

@workflows = {} @workflows['always'] = workflows.select {|w| !w.author && !w.assignee} @workflows['author'] = workflows.select {|w| w.author}

Ticket History (1/1 Histories)

2015-07-19 15:44 Updated by: giray_pultar
  • New Ticket "find(:all) is deprecated" created

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login