Class ArticlesController
In: app/controllers/articles_controller.rb
Parent: ApplicationController

Methods

index   show  

Public Instance methods

[Source]

    # File app/controllers/articles_controller.rb, line 4
 4:   def index
 5:     @feed_title = t('documents.feed_title', :name => t('site_name'))
 6:     
 7:     @articles = Article.published.translated.paginate( :page => params[:page], :per_page => 15, :order => 'published_at DESC')
 8:     respond_to do |format|
 9:       format.html
10:       format.rss {render :layout => false}
11:     end
12:   end

[Source]

    # File app/controllers/articles_controller.rb, line 14
14:   def show
15:     begin
16:       @article = Article.published.find(params[:id])
17:     rescue ActiveRecord::RecordNotFound
18:       if can_edit?("articles")
19:         @article = Article.find(params[:id])
20:       else
21:         raise ActiveRecord::RecordNotFound
22:       end
23:     end
24:     
25:     @parent = @article
26:     @comments = @article.comments.approved.paginate :page => params[:page], :per_page => 50
27:   end

[Validate]