Sha256: a8e72df636b2aa8c3d62234176952ff33dd8873c6561d833027320156c3ed612
Contents?: true
Size: 551 Bytes
Versions: 6
Compression:
Stored size: 551 Bytes
Contents
module Workarea module Storefront class BlogsController < Storefront::ApplicationController before_action :cache_page def index blogs = Workarea::Content::Blog.all.map do |blog| Storefront::BlogViewModel.new(blog, view_model_options) end @blog_index = Storefront::BlogIndexViewModel.new(blogs, view_model_options) end def show model = Content::Blog.find_by(slug: params[:id]) @blog = Storefront::BlogViewModel.new(model, view_model_options) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems