fix post set bug, fixes #768
This commit is contained in:
@@ -39,7 +39,7 @@ class PostsController < ApplicationController
|
|||||||
@error_message = @post.errors.full_messages.join("; ")
|
@error_message = @post.errors.full_messages.join("; ")
|
||||||
render :template => "static/error", :status => 500
|
render :template => "static/error", :status => 500
|
||||||
else
|
else
|
||||||
redirect_to post_path(@post)
|
redirect_to post_path(@post, :tags => params[:tags])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ module PostSets
|
|||||||
end
|
end
|
||||||
|
|
||||||
@posts ||= begin
|
@posts ||= begin
|
||||||
::Post.tag_match(tag_string).paginate(page, :count => ::Post.fast_count(tag_string), :limit => per_page)
|
temp = ::Post.tag_match(tag_string).paginate(page, :count => ::Post.fast_count(tag_string), :limit => per_page)
|
||||||
temp.all
|
temp.all
|
||||||
temp
|
temp
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= form_for(post, :html => {:class => "simple_form", :id => "form"}) do |f| %>
|
<%= form_for(post, :html => {:class => "simple_form", :id => "form"}) do |f| %>
|
||||||
|
<%= hidden_field_tag :tags, params[:tags] %>
|
||||||
<%= f.hidden_field :old_tag_string, :value => post.tag_string %>
|
<%= f.hidden_field :old_tag_string, :value => post.tag_string %>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
|
|||||||
Reference in New Issue
Block a user