Sha256: eb48562bfa7a570c28fcee11c34595cb1250a2404cf0bf929f0b1df867c361a9
Contents?: true
Size: 570 Bytes
Versions: 8
Compression:
Stored size: 570 Bytes
Contents
require 'json' class <%= @scaffold.controller_name %>Controller < ApplicationController def show # Standard find by ID <%= "@#{@scaffold.model_file_name}" %> = <%= @scaffold.model_name %>.find(params[:id]) # Find by path <%= "@#{@scaffold.model_file_name}" %> = <%= @scaffold.model_name %>.find_by_path(request.path) if <%= "@#{@scaffold.model_file_name}" %> render :show else render file: "#{Rails.root}/public/404.html", status: :not_found Rails.logger.error "404 - Page #{request.path} cannot be found." end end end
Version data entries
8 entries across 8 versions & 1 rubygems