Add option to configure feed items displayed in homepage
This commit is contained in:
16
app/controllers/admin/widget/feeds_controller.rb
Normal file
16
app/controllers/admin/widget/feeds_controller.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class Admin::Widget::FeedsController < Admin::BaseController
|
||||
|
||||
def update
|
||||
@feed = ::Widget::Feed.find(params[:id])
|
||||
@feed.update(feed_params)
|
||||
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def feed_params
|
||||
params.require(:widget_feed).permit(:limit)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user