Class: Gluttonberg::Admin::Settings::EmbedsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- BaseController
- Gluttonberg::Admin::Settings::EmbedsController
- Defined in:
- app/controllers/gluttonberg/admin/settings/embeds_controller.rb
Overview
this controller manages embed code (shortcodes). wysiwyg snippets which can be embed in other content.
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #list_for_redactor ⇒ Object
- #new ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 22 def create @embed = Embed.new(params[:gluttonberg_embed]) generic_create(@embed, { :name => "embed", :success_path => }) end |
#delete ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 41 def delete display_delete_confirmation( :title => "Delete Embed '#{@embed.name}'?", :url => (@embed), :return_url => , :warning => "" ) end |
#destroy ⇒ Object
50 51 52 53 54 55 56 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 50 def destroy generic_destroy(@embed, { :name => "embed", :success_path => , :failure_path => }) end |
#edit ⇒ Object
30 31 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 30 def edit end |
#index ⇒ Object
14 15 16 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 14 def index @embeds = Embed.order("created_at ASC") end |
#list_for_redactor ⇒ Object
58 59 60 61 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 58 def list_for_redactor @embeds = Embed.order("created_at ASC") render :layout => false end |
#new ⇒ Object
18 19 20 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 18 def new @embed = Embed.new end |
#update ⇒ Object
33 34 35 36 37 38 39 |
# File 'app/controllers/gluttonberg/admin/settings/embeds_controller.rb', line 33 def update @embed.assign_attributes(params[:gluttonberg_embed]) generic_update(@embed, { :name => "embed", :success_path => }) end |