Sha256: a2529b6db03e6b062ee64d02c2657de87179dcc72a542d92d842cd7ac3ee6504
Contents?: true
Size: 686 Bytes
Versions: 3
Compression:
Stored size: 686 Bytes
Contents
module Elabs class ArticlesController < ContentApplicationController ALLOWED_NESTED_FROM = %w[language license tag user project].freeze ALLOWED_ORDER_FROM = %w[title published_at updated_at].freeze before_action :set_article, only: %i[show] # GET /articles # GET /articles.json def index @articles = scope_request(Article.published).page(params[:page]).per(self.class::MAX_ITEMS_PER_PAGE) end # GET /articles/1 # GET /articles/1.json def show; end private # Use callbacks to share common setup or constraints between actions. def set_article @article = Article.find_publicly_visible(params[:id]) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
elabs-3.0.0 | app/controllers/elabs/articles_controller.rb |
elabs-2.0.0 | app/controllers/elabs/articles_controller.rb |
elabs-2.0.0.pre | app/controllers/elabs/articles_controller.rb |