Sha256: b832b99045ec9ca30fce61ad6b16ffdd6c57211ee44fd189ab90403f904d276a
Contents?: true
Size: 846 Bytes
Versions: 8
Compression:
Stored size: 846 Bytes
Contents
module Fae class OptionsController < ApplicationController before_filter :super_admin_only def edit @option = Option.first || Option.instance @option.build_logo if @option.logo.blank? @option.build_favicon if @option.favicon.blank? end # PATCH/PUT /options/1 def update if @option.update(option_params) flash[:notice] = 'Option was successfully updated.' redirect_to :action => :edit else render :edit end end private # Only allow a trusted parameter "white list" through. def option_params params.require(:option).permit(:title, :time_zone, :colorway, :stage_url, :live_url, logo_attributes: [:id, :asset, :asset_cache, :attached_as, :alt], favicon_attributes: [:id, :asset, :asset_cache, :attached_as, :alt]) end end end
Version data entries
8 entries across 8 versions & 1 rubygems