Sha256: 9ccb3dc4dee545646fdb6f481e116daa557fa619ab1678aa8b3591bc7a1f09ba
Contents?: true
Size: 667 Bytes
Versions: 13
Compression:
Stored size: 667 Bytes
Contents
class Admin::SettingsController < Admin::BaseController respond_to :html, :js def index @search = Setting.search(params[:search]) @settings = @search.page(params[:page] || 1) end def new @setting = Setting.new end def edit end def create @setting = Setting.new(params[:setting]) if @setting.respond_to?(:author) @setting.author ||= current_user end @setting.save respond_with(@setting) end def update @setting.attributes = params[:setting] @setting.save respond_with(@setting) end def destroy @setting.destroy respond_with(@setting) end end
Version data entries
13 entries across 13 versions & 1 rubygems