Permalink
Browse files

Fixing Admin Save Page redirects

  • Loading branch information...
1 parent 713f082 commit e511315acf559de248ead80b1b51a306343ddd43 @jcnetdev jcnetdev committed Sep 16, 2008
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/auto_admin_configuration.rb
  2. +2 −2 lib/auto_admin_controller.rb
@@ -538,7 +538,7 @@ def append_search_condition!(query, options={})
unless query.empty?
conditions = options[:conditions] || []
conditions = [conditions] unless conditions.is_a? Array
- new_condition = '(' + columns_for_search.map { |col| "#{col} ILIKE ?" }.join( ' OR ' ) + ')'
+ new_condition = '(' + columns_for_search.map { |col| "#{col} LIKE ?" }.join( ' OR ' ) + ')'
if conditions.size > 0
conditions[0] = "(#{conditions[0]}) AND (#{new_condition})"
else
@@ -226,10 +226,10 @@ def save
if params[:_continue]
flash[:notice] << "You may edit it again below."
- redirect_to :action => 'edit', :model => params[:model], :id => @object
+ redirect_to :action => 'edit'
elsif params[:_addanother]
flash[:notice] << "You may add another #{human_model.downcase} below."
- redirect_to :action => 'edit', :model => params[:model]
+ redirect_to :action => 'edit', :id => nil
else
redirect_to list_page_for_current
end

0 comments on commit e511315

Please sign in to comment.