Sha256: a70addf825f4a34b7928e9181431acdcba1c94ad79068fabf43e816812b37a9b

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

require "generators/kiso_themes/page_generator"

module KisoThemes
  module Generators
    class BlogPostPagesGenerator < PageGenerator
      view_name "frontend_pages/blog_pages", "blog_post"

      namespace "kiso_themes:blog_post_pages"

      def set_layout
        controller_const_name = "#{name.camelize}Controller"
        inject_into_class File.join('app/controllers', class_path, "#{file_name}_controller.rb"), controller_const_name, "  layout '_base'\n"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kiso_themes-1.0.2 lib/generators/kiso_themes/blog_post_pages_generator.rb