This commit is contained in:
10
app/controllers/pictures_controller.rb
Normal file
10
app/controllers/pictures_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class PicturesController < LeafablesController
|
||||
private
|
||||
def new_leafable
|
||||
Picture.new leafable_params
|
||||
end
|
||||
|
||||
def leafable_params
|
||||
params.fetch(:picture, {}).permit(:image, :caption)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user