Skip to content

Commit c7c35ab

Browse files
committed
Update old finders (for papyri#271)
1 parent 9e7b896 commit c7c35ab

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ publications.
219219
* cd REPOSITORY_ROOT/canonical.git && git repack && echo "" > objects/info/alternates
220220
* can check integrity afterwards with "git fsck"
221221
* rm -rf REPOSITORY_ROOT/boards/*.git REPOSITORY_ROOT/users/*.git
222-
* can also delete every model instance from the console with e.g. User.find(:all).each{|u| u.destroy} but this can be tedious if there are loose instances of other models that aren't dependent-destroyed
222+
* can also delete every model instance from the console with e.g. User.all.each{|u| u.destroy} but this can be tedious if there are loose instances of other models that aren't dependent-destroyed
223223

224224
= XSugar Standalone
225225
* to start a local XSugar standalone server:

app/views/cross_site/_user_tabs.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
= link_to community.format_name, :controller => "User", :action => "user_community_dashboard", :community_id => community.id
6767

6868
-#there is no real diff between this view and the user view
69-
- end_communities = Community.find(:all, :conditions => {:end_user_id => @current_user.id} )
69+
- end_communities = Community.where(end_user_id: @current_user.id)
7070
- if end_communities && end_communities.length > 0
7171
%li
7272
Completed

app/views/user/user_dashboard.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
= link_to "Archived", :controller => 'user', :action => 'archives', :id => @current_user.id
3131

3232
- if defined?(@show_events)
33-
- @events = Event.find(:all, :order => "created_at DESC", :limit => 25, :include => [:owner, :target])[0..24]
33+
- @events = Event.order(created_at: :desc).limit(25).includes(:owner, :target)
3434
%h2 News Feed
3535
= render :partial => "events/list", :object => @events

lib/tasks/rpx.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace :rpx do
22
desc "Unmaps all user mappings for the current environment and drops them from the database"
33
task :unmap => :environment do
44
@rpx = Rpx::RpxHelper.new(RPX_API_KEY, RPX_BASE_URL, RPX_REALM)
5-
@users = User.find(:all)
5+
@users = User.all
66

77
for user in @users
88
identifiers = @rpx.mappings(user.id)

0 commit comments

Comments
 (0)