Class: ContentBlocksController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/content_blocks_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



9
10
11
12
13
14
15
16
17
# File 'app/controllers/content_blocks_controller.rb', line 9

def create
  @content_block.save
  if respond_to? :redirect_back
    redirect_back fallback_location: sufia.content_blocks_path
  else
    # Deprecated in Rails 5.0
    redirect_to :back
  end
end

#indexObject



6
7
# File 'app/controllers/content_blocks_controller.rb', line 6

def index
end

#updateObject



19
20
21
22
23
24
25
26
27
# File 'app/controllers/content_blocks_controller.rb', line 19

def update
  @content_block.update(update_params)
  if respond_to? :redirect_back
    redirect_back fallback_location: sufia.content_blocks_path
  else
    # Deprecated in Rails 5.0
    redirect_to :back
  end
end