Sha256: 3c1f51d6091f01a29ae1fe08f454e33c22efd80f1ecb65dc55ba1ef7e239df6e

Contents?: true

Size: 300 Bytes

Versions: 4

Compression:

Stored size: 300 Bytes

Contents

class Admin::SnippetsController < AdminController
  def index
  end

  def update
    params[:snippets].each do |key, content|
      RedisSnippets::Snippets.update(key.to_sym, params[:snippets][key])
    end
    
    flash[:notice] = 'Snippets updated.'
    redirect_to admin_snippets_path
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redis_snippets-0.0.4 app/controllers/admin/snippets_controller.rb
redis_snippets-0.0.3 app/controllers/admin/snippets_controller.rb
redis_snippets-0.0.2 app/controllers/admin/snippets_controller.rb
redis_snippets-0.0.1 app/controllers/admin/snippets_controller.rb