aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2012-06-27 22:29:31 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2012-06-27 22:29:31 +0300
commit8b1d10fab257d8a0ce7230f27a530dd7f8140acc (patch)
treea51bffee0dd234df9c823257d9c7bf3a02c92fd6 /app
parentfc97c846689d545a2b3844c8f9810eda129c8803 (diff)
downloadrefinerycms-blog-8b1d10fab257d8a0ce7230f27a530dd7f8140acc.tar.gz
refinerycms-blog-8b1d10fab257d8a0ce7230f27a530dd7f8140acc.tar.bz2
refinerycms-blog-8b1d10fab257d8a0ce7230f27a530dd7f8140acc.zip
Use shorter syntax of render where possible.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/refinery/blog/admin/comments_controller.rb6
-rw-r--r--app/controllers/refinery/blog/admin/posts_controller.rb2
-rw-r--r--app/controllers/refinery/blog/posts_controller.rb2
-rw-r--r--app/views/refinery/blog/admin/categories/_form.html.erb18
-rw-r--r--app/views/refinery/blog/admin/categories/_sortable_list.html.erb6
-rw-r--r--app/views/refinery/blog/admin/comments/_sortable_list.html.erb6
-rw-r--r--app/views/refinery/blog/admin/posts/_form.html.erb22
-rw-r--r--app/views/refinery/blog/admin/posts/_sortable_list.html.erb6
-rw-r--r--app/views/refinery/blog/admin/settings/notification_recipients.html.erb12
-rw-r--r--app/views/refinery/blog/posts/_comments.html.erb8
-rw-r--r--app/views/refinery/blog/posts/show.html.erb2
11 files changed, 37 insertions, 53 deletions
diff --git a/app/controllers/refinery/blog/admin/comments_controller.rb b/app/controllers/refinery/blog/admin/comments_controller.rb
index 8565b28..18246ee 100644
--- a/app/controllers/refinery/blog/admin/comments_controller.rb
+++ b/app/controllers/refinery/blog/admin/comments_controller.rb
@@ -12,14 +12,14 @@ module Refinery
def index
@comments = Refinery::Blog::Comment.unmoderated.page(params[:page])
- render :action => 'index'
+ render :index
end
def approved
unless params[:id].present?
@comments = Refinery::Blog::Comment.approved.page(params[:page])
- render :action => 'index'
+ render :index
else
@comment = Refinery::Blog::Comment.find(params[:id])
@comment.approve!
@@ -33,7 +33,7 @@ module Refinery
unless params[:id].present?
@comments = Refinery::Blog::Comment.rejected.page(params[:page])
- render :action => 'index'
+ render :index
else
@comment = Refinery::Blog::Comment.find(params[:id])
@comment.reject!
diff --git a/app/controllers/refinery/blog/admin/posts_controller.rb b/app/controllers/refinery/blog/admin/posts_controller.rb
index e48c00d..cbde2f8 100644
--- a/app/controllers/refinery/blog/admin/posts_controller.rb
+++ b/app/controllers/refinery/blog/admin/posts_controller.rb
@@ -66,7 +66,7 @@ module Refinery
end
else
unless request.xhr?
- render :action => 'new'
+ render :new
else
render :partial => "/refinery/admin/error_messages",
:locals => {
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb
index bb242fd..bd579c4 100644
--- a/app/controllers/refinery/blog/posts_controller.rb
+++ b/app/controllers/refinery/blog/posts_controller.rb
@@ -51,7 +51,7 @@ module Refinery
:anchor => "comment-#{@comment.to_param}")
end
else
- render :action => 'show'
+ render :show
end
end
diff --git a/app/views/refinery/blog/admin/categories/_form.html.erb b/app/views/refinery/blog/admin/categories/_form.html.erb
index 6b4e20d..559dbe1 100644
--- a/app/views/refinery/blog/admin/categories/_form.html.erb
+++ b/app/views/refinery/blog/admin/categories/_form.html.erb
@@ -1,9 +1,7 @@
<%= form_for [refinery, :blog_admin, @category] do |f| -%>
- <%= render :partial => "/refinery/admin/error_messages",
- :locals => {
- :object => f.object,
- :include_object_name => true
- } %>
+ <%= render "/refinery/admin/error_messages",
+ :object => f.object,
+ :include_object_name => true %>
<%= render "/refinery/blog/admin/shared/locale_picker",
:current_locale => Thread.current[:globalize_locale] if Refinery.i18n_enabled? %>
@@ -13,10 +11,8 @@
<%= f.text_field :title, :class => 'larger widest' -%>
</div>
- <%= render :partial => "/refinery/admin/form_actions",
- :locals => {
- :f => f,
- :continue_editing => false,
- :delete_title => t('delete', :scope => 'refinery.blog.admin.categories.category')
- } %>
+ <%= render "/refinery/admin/form_actions",
+ :f => f,
+ :continue_editing => false,
+ :delete_title => t('delete', :scope => 'refinery.blog.admin.categories.category') %>
<% end %>
diff --git a/app/views/refinery/blog/admin/categories/_sortable_list.html.erb b/app/views/refinery/blog/admin/categories/_sortable_list.html.erb
index 8040dc0..2a6461a 100644
--- a/app/views/refinery/blog/admin/categories/_sortable_list.html.erb
+++ b/app/views/refinery/blog/admin/categories/_sortable_list.html.erb
@@ -1,7 +1,5 @@
<ul id='sortable_list'>
<%= render :partial => 'category', :collection => @categories %>
</ul>
-<%= render :partial => "/refinery/admin/sortable_list",
- :locals => {
- :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
- } %>
+<%= render "/refinery/admin/sortable_list",
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true) %>
diff --git a/app/views/refinery/blog/admin/comments/_sortable_list.html.erb b/app/views/refinery/blog/admin/comments/_sortable_list.html.erb
index 9f8bbbc..6596896 100644
--- a/app/views/refinery/blog/admin/comments/_sortable_list.html.erb
+++ b/app/views/refinery/blog/admin/comments/_sortable_list.html.erb
@@ -1,7 +1,5 @@
<ul id='sortable_list'>
<%= render :partial => 'comment', :collection => @comments %>
</ul>
-<%= render :partial => "/refinery/admin/sortable_list",
- :locals => {
- :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
- } %>
+<%= render "/refinery/admin/sortable_list",
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true) %>
diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb
index b6fc535..9e91133 100644
--- a/app/views/refinery/blog/admin/posts/_form.html.erb
+++ b/app/views/refinery/blog/admin/posts/_form.html.erb
@@ -1,9 +1,7 @@
<%= form_for [refinery, :blog_admin, @post] do |f| -%>
- <%= render :partial => "/refinery/admin/error_messages",
- :locals => {
- :object => f.object,
- :include_object_name => true
- } %>
+ <%= render "/refinery/admin/error_messages",
+ :object => f.object,
+ :include_object_name => true %>
<%= render "/refinery/blog/admin/shared/locale_picker",
:current_locale => Thread.current[:globalize_locale] if Refinery.i18n_enabled? %>
@@ -117,14 +115,14 @@
<%= render '/seo_meta/form', :form => f %>
</div>
</div>
- <%= render :partial => "/refinery/admin/form_actions",
- :locals => {
- :f => f,
- :continue_editing => true,
- :delete_title => t('delete', :scope => 'refinery.blog.admin.posts.post')
- } %>
+ <%= render "/refinery/admin/form_actions",
+ :f => f,
+ :continue_editing => true,
+ :delete_title => t('delete', :scope => 'refinery.blog.admin.posts.post') %>
<% end -%>
<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/backend') %>
<% content_for :javascripts, javascript_include_tag('refinery/blog/backend') %>
-<%= render 'refinery/shared/admin/autocomplete', :dom_id => '#blog_post_tag_list', :url => refinery.tags_blog_admin_posts_url %>
+<%= render 'refinery/shared/admin/autocomplete',
+ :dom_id => '#blog_post_tag_list',
+ :url => refinery.tags_blog_admin_posts_url %>
diff --git a/app/views/refinery/blog/admin/posts/_sortable_list.html.erb b/app/views/refinery/blog/admin/posts/_sortable_list.html.erb
index 471d4f0..e924d19 100644
--- a/app/views/refinery/blog/admin/posts/_sortable_list.html.erb
+++ b/app/views/refinery/blog/admin/posts/_sortable_list.html.erb
@@ -1,7 +1,5 @@
<ul id='sortable_list'>
<%= render :partial => 'post', :collection => @posts %>
</ul>
-<%= render :partial => "/refinery/admin/sortable_list",
- :locals => {
- :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true)
- } %>
+<%= render "/refinery/admin/sortable_list",
+ :continue_reordering => (defined?(continue_reordering) ? continue_reordering : true) %>
diff --git a/app/views/refinery/blog/admin/settings/notification_recipients.html.erb b/app/views/refinery/blog/admin/settings/notification_recipients.html.erb
index 132ab17..dc7070f 100644
--- a/app/views/refinery/blog/admin/settings/notification_recipients.html.erb
+++ b/app/views/refinery/blog/admin/settings/notification_recipients.html.erb
@@ -14,11 +14,9 @@
<%= t('.example') %>
</p>
- <%= render :partial => "/refinery/admin/form_actions",
- :locals => {
- :f => nil,
- :continue_editing => false,
- :cancel_url => refinery.blog_admin_posts_url,
- :hide_delete => true
- } %>
+ <%= render "/refinery/admin/form_actions",
+ :f => nil,
+ :continue_editing => false,
+ :cancel_url => refinery.blog_admin_posts_url,
+ :hide_delete => true %>
<% end %>
diff --git a/app/views/refinery/blog/posts/_comments.html.erb b/app/views/refinery/blog/posts/_comments.html.erb
index d662a1f..8415971 100644
--- a/app/views/refinery/blog/posts/_comments.html.erb
+++ b/app/views/refinery/blog/posts/_comments.html.erb
@@ -16,11 +16,9 @@
<h2><%= t('add', :scope => 'refinery.blog.posts.show.comments') %></h2>
<%= form_for [refinery, :blog, @comment] do |f| %>
- <%= render :partial => "/refinery/admin/error_messages",
- :locals => {
- :object => f.object,
- :include_object_name => true
- } %>
+ <%= render "/refinery/admin/error_messages",
+ :object => f.object,
+ :include_object_name => true %>
<div class='field'>
<%= f.label :name %>
<%= f.text_field :name %>
diff --git a/app/views/refinery/blog/posts/show.html.erb b/app/views/refinery/blog/posts/show.html.erb
index d7abd1e..bc9b203 100644
--- a/app/views/refinery/blog/posts/show.html.erb
+++ b/app/views/refinery/blog/posts/show.html.erb
@@ -10,7 +10,7 @@
<%= render '/refinery/blog/shared/body_content_right' %>
-<%= render :partial => "/refinery/content_page", :locals => { :remove_automatic_sections => true } %>
+<%= render "/refinery/content_page", :remove_automatic_sections => true %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %>
<% content_for :javascripts do %>