diff options
author | Jérémy FRERE <frere.jeremy@gmail.com> | 2013-10-24 12:41:20 +0200 |
---|---|---|
committer | Philip Arndt <git@p.arndt.io> | 2015-05-14 09:52:29 +1200 |
commit | a9288cc3bd998d7c179b080f56eccd6a56f59133 (patch) | |
tree | b4658ea330aab2f713151058b40cbbd1f2ac127a /app/controllers | |
parent | bb0d3b0da633053c0236bdbe5a9452ae9655fda7 (diff) | |
download | refinerycms-blog-a9288cc3bd998d7c179b080f56eccd6a56f59133.tar.gz refinerycms-blog-a9288cc3bd998d7c179b080f56eccd6a56f59133.tar.bz2 refinerycms-blog-a9288cc3bd998d7c179b080f56eccd6a56f59133.zip |
Adds a button to delete the displayed translation of a blog post
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/refinery/blog/admin/posts_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/refinery/blog/admin/posts_controller.rb b/app/controllers/refinery/blog/admin/posts_controller.rb index d01bba9..4eeffd0 100644 --- a/app/controllers/refinery/blog/admin/posts_controller.rb +++ b/app/controllers/refinery/blog/admin/posts_controller.rb @@ -75,6 +75,13 @@ module Refinery end end + def delete_translation + find_post + @post.translations.find_by_locale(params[:locale_to_delete]).destroy + flash[:notice] = ::I18n.t('delete_translation_success', :scope => 'refinery.blog.admin.posts.post') + redirect_to refinery.blog_admin_posts_path + end + private def post_params |