Sha256: 8aa2bfec526dcceca77946ad88543aa9456ae2f2cbb633c828c588433402df9f
Contents?: true
Size: 682 Bytes
Versions: 4
Compression:
Stored size: 682 Bytes
Contents
class ContentBlocksController < ApplicationController load_and_authorize_resource except: :index before_filter :load_featured_researchers, only: :index authorize_resource only: :index def index end def create @content_block.save redirect_to :back end def update @content_block.update(update_params) redirect_to :back end protected def create_params params.require(:content_block).permit([:name, :value, :external_key]) end def update_params params.require(:content_block).permit([:value, :external_key]) end def load_featured_researchers @content_blocks = ContentBlock.recent_researchers.page(params[:page]) end end
Version data entries
4 entries across 4 versions & 1 rubygems