Sha256: e2236f069ea44e1b24a7e91d53b4a8fb661a8ec170a175009026d4976fe6c24e
Contents?: true
Size: 726 Bytes
Versions: 2
Compression:
Stored size: 726 Bytes
Contents
module JcCms class Dashboard::PagesController < ApplicationController layout "jc_cms/jc_cms" before_filter :authenticate_user! def index @pages = Page.all end def show @page = Page.find(params[:id]) end def new @page = Page.new end def create @page = Page.new @page.assign_attributes(params[:page]) @page.save! redirect_to dashboard_pages_path end def edit @page = Page.find(params[:id]) end def update @page = Page.find(params[:id]) @page.assign_attributes(params[:page]) @page.save! redirect_to dashboard_page_path(@page) end def destroy page = Page.find(params[:id]) page.delete redirect_to dashboard_pages_path end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jc_cms-0.0.2 | app/controllers/jc_cms/dashboard/pages_controller.rb |
jc_cms-0.0.1 | app/controllers/jc_cms/dashboard/pages_controller.rb |