aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorPhilip Arndt <git@p.arndt.io>2016-02-14 16:01:05 +1300
committerPhilip Arndt <git@p.arndt.io>2016-02-14 16:01:05 +1300
commit8d052c50e20da74a17b284225f69b5d4c1beb52e (patch)
treeb01138a621e0a0475c4110f4cac1f683970eb8e5 /app
parent812bff92c069b5932ef49e1b2d6827c8286c1075 (diff)
downloadrefinerycms-blog-8d052c50e20da74a17b284225f69b5d4c1beb52e.tar.gz
refinerycms-blog-8d052c50e20da74a17b284225f69b5d4c1beb52e.tar.bz2
refinerycms-blog-8d052c50e20da74a17b284225f69b5d4c1beb52e.zip
Added permitted_post_params to PostsController
In the style of refinerycms core extensions
Diffstat (limited to 'app')
-rw-r--r--app/controllers/refinery/blog/admin/posts_controller.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/refinery/blog/admin/posts_controller.rb b/app/controllers/refinery/blog/admin/posts_controller.rb
index 61ac433..aeb3c43 100644
--- a/app/controllers/refinery/blog/admin/posts_controller.rb
+++ b/app/controllers/refinery/blog/admin/posts_controller.rb
@@ -85,9 +85,15 @@ module Refinery
private
def post_params
- params.require(:post).permit(:title, :body, :custom_teaser, :tag_list,
+ params.require(:post).permit(permitted_post_params)
+ end
+
+ def permitted_post_params
+ [
+ :title, :body, :custom_teaser, :tag_list,
:draft, :published_at, :custom_url, :user_id, :browser_title,
- :meta_description, :source_url, :source_url_title, :category_ids => [])
+ :meta_description, :source_url, :source_url_title, :category_ids => []
+ ]
end
protected