Sha256: b9d68d64c895acef4b0305cd0864eae53df29ab4afa44a9f357c29d17ccee090

Contents?: true

Size: 635 Bytes

Versions: 88

Compression:

Stored size: 635 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Blogs
    module Admin
      # Base controller for the administration of this module. It inherits from
      # Decidim's admin base controller in order to inherit the layout and other
      # convenience methods relevant to a this component.
      class ApplicationController < Decidim::Admin::Components::BaseController
        helper_method :posts, :post

        def posts
          @posts ||= Post.where(component: current_component).page(params[:page]).per(15)
        end

        def post
          @post ||= posts.find(params[:id])
        end
      end
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
decidim-blogs-0.29.1 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.28.4 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.27.9 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.29.0 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.28.3 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.27.8 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.29.0.rc4 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.29.0.rc3 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.29.0.rc2 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.29.0.rc1 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.28.2 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.27.7 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.28.1 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.27.6 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.26.10 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.26.9 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.28.0 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.27.5 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.28.0.rc5 app/controllers/decidim/blogs/admin/application_controller.rb
decidim-blogs-0.28.0.rc4 app/controllers/decidim/blogs/admin/application_controller.rb