@@ -54,10 +54,10 @@ class PostsController < ApplicationController
|
||||
if @post.errors.any?
|
||||
@error_message = @post.errors.full_messages.join("; ")
|
||||
render :template => "static/error", :status => 500
|
||||
elsif params[:tags].present? && params[:pool_id].present?
|
||||
redirect_to post_path(@post, :tags => params[:tags], :pool_id => params[:pool_id])
|
||||
elsif params[:tags].present?
|
||||
redirect_to post_path(@post, :tags => params[:tags])
|
||||
elsif params[:tags_query].present? && params[:pool_id].present?
|
||||
redirect_to post_path(@post, :tags => params[:tags_query], :pool_id => params[:pool_id])
|
||||
elsif params[:tags_query].present?
|
||||
redirect_to post_path(@post, :tags => params[:tags_query])
|
||||
elsif params[:pool_id].present?
|
||||
redirect_to post_path(@post, :pool_id => params[:pool_id])
|
||||
else
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<% end %>
|
||||
|
||||
<%= form_for(post, :html => {:class => "simple_form", :id => "form"}) do |f| %>
|
||||
<%= hidden_field_tag :tags, params[:tags] %>
|
||||
<%= hidden_field_tag :tags_query, params[:tags] %>
|
||||
<%= hidden_field_tag :pool_id, params[:pool_id] %>
|
||||
<%= f.hidden_field :old_tag_string, :value => post.tag_string %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user