Sha256: 7cec9bc03e14f24e327893daef78fea81942def55879296a9d5362ca1f8e21b6
Contents?: true
Size: 599 Bytes
Versions: 4
Compression:
Stored size: 599 Bytes
Contents
require_dependency "phcdevworks_tutorials/application_controller" module PhcdevworksTutorials class Blog::TutorialsController < ApplicationController # Layout layout 'phcdevworks_tutorials/frontend' # INDEX def index @phcdevworks_tutorials_index = Tutorial::Post.where(tutorial_post_status: "published").order("created_at DESC") @phcdevworks_tutorials_photo_randomizer = Tutorial::Post.order('RANDOM()').limit(1) end # SHOW def show @phcdevworks_tutorials_single = Tutorial::Post.friendly.find(params[:id]) end end end
Version data entries
4 entries across 4 versions & 1 rubygems