Class LinksController
In: app/controllers/links_controller.rb
Parent: ApplicationController

Methods

index   show  

Public Instance methods

[Source]

    # File app/controllers/links_controller.rb, line 4
 4:   def index
 5:     @title = t('documents.Links')
 6:     @links = Link.published.paginate :page => params[:page],  :order => 'published_at DESC'
 7:     respond_to do |format|
 8:       format.html
 9:       format.rss {render :layout => false}
10:     end
11:   end

[Source]

    # File app/controllers/links_controller.rb, line 13
13:   def show
14:     begin
15:       @link = Link.published.find(params[:id])
16:     rescue ActiveRecord::RecordNotFound
17:       if can_access?("links")
18:         @link = Link.find(params[:id])
19:       else
20:         raise ActiveRecord::RecordNotFound
21:       end
22:     end
23:     redirect_to @link.url
24:   end

[Validate]