Class RankingsController
In: app/controllers/rankings_controller.rb
Parent: ApplicationController

Methods

index   top_logis   top_users  

Public Instance methods

REST-methods

[Source]

    # File app/controllers/rankings_controller.rb, line 35
35:   def index
36:     @selected = params[:selected]
37:     respond_to do |format|
38:       format.html do 
39:         render_to_main_body(:top_users)
40:       end
41:       format.js do
42:         # check that valid method & not random code
43:         if self.respond_to?(@selected)
44:           self.send(@selected.to_sym)
45:         end
46:       end
47:     end
48:   end

[Source]

    # File app/controllers/rankings_controller.rb, line 59
59:   def top_logis
60:     @ratings = current_prefs.peer_group.ratings.best.paginate(
61:         :page => params[:page], :per_page => 8)
62:     render_ajax_body :partial => 'top_logis.html.erb',
63:         :locals => {:selected => @selected}
64:   end

Tabbed methods

[Source]

    # File app/controllers/rankings_controller.rb, line 52
52:   def top_users
53:     @memberships = current_prefs.peer_group.memberships.best.paginate(
54:         :page => params[:page], :per_page => 14)
55:     render_ajax_body :partial => 'top_users.html.erb',
56:         :locals => {:selected => @selected}
57:   end

[Validate]