Sha256: ba9d4bf3c4df3bcf423a8d43c32b5dd1685977d0c22cc1fb27931c2cd94cd72e
Contents?: true
Size: 701 Bytes
Versions: 14
Compression:
Stored size: 701 Bytes
Contents
class ContentBlocksController < ApplicationController load_and_authorize_resource except: :index before_action :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
14 entries across 14 versions & 1 rubygems