Class: ContentBlock::RichBlocksController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- ContentBlock::RichBlocksController
- Defined in:
- app/controllers/content_block/rich_blocks_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /content-block/rich-blocks.
-
#destroy ⇒ Object
DELETE /content-block/rich-blocks/1.
-
#edit ⇒ Object
GET /content-block/rich-blocks/1/edit.
-
#index ⇒ Object
GET /content-block/rich-blocks.
-
#new ⇒ Object
GET /content-block/rich-blocks/new.
-
#show ⇒ Object
GET /content-block/rich-blocks/1.
-
#update ⇒ Object
PATCH/PUT /content-block/rich-blocks/1.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /content-block/rich-blocks
27 28 29 30 31 32 33 34 35 |
# File 'app/controllers/content_block/rich_blocks_controller.rb', line 27 def create @rich_block = RichBlock.new(rich_block_params) if @rich_block.save redirect_to @rich_block, notice: 'RichBlock was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /content-block/rich-blocks/1
47 48 49 50 |
# File 'app/controllers/content_block/rich_blocks_controller.rb', line 47 def destroy @rich_block.destroy redirect_to rich_blocks_url, notice: 'RichBlock was successfully destroyed.' end |
#edit ⇒ Object
GET /content-block/rich-blocks/1/edit
23 24 |
# File 'app/controllers/content_block/rich_blocks_controller.rb', line 23 def edit end |
#index ⇒ Object
GET /content-block/rich-blocks
9 10 11 |
# File 'app/controllers/content_block/rich_blocks_controller.rb', line 9 def index @rich_blocks = RichBlock.all end |
#new ⇒ Object
GET /content-block/rich-blocks/new
18 19 20 |
# File 'app/controllers/content_block/rich_blocks_controller.rb', line 18 def new @rich_block = RichBlock.new end |
#show ⇒ Object
GET /content-block/rich-blocks/1
14 15 |
# File 'app/controllers/content_block/rich_blocks_controller.rb', line 14 def show end |
#update ⇒ Object
PATCH/PUT /content-block/rich-blocks/1
38 39 40 41 42 43 44 |
# File 'app/controllers/content_block/rich_blocks_controller.rb', line 38 def update if @rich_block.update(rich_block_params) redirect_to @rich_block, notice: 'RichBlock was successfully updated.' else render :edit end end |