Colin Law wrote:
> I think you need to provide more information for us to understand the
> problem (for me to understand it anyway). Can you post the code you are
> using to search for name "abc xyz" which is being turned into a query
> "abc-xyz" as that is very odd.  If you could post an extract from the 
> code,
> an extract from the log showing the query, and the table structure then
> someone may be able to work out what the problem is.
> 
> Colin
> 
> 2009/5/23 Santosh Turamari <rails-mailing-l...@andreas-s.net>

I am using this code.

***********************************************************************
In application_helper

return url_for :only_path => false,:controller => 'community', :action 
=> 'search_route',:company =>((company.downcase.strip.squeeze(" 
")).gsub(/[^[:alnum:]'&''.''!']/,'-')).squeeze("-").chomp("-"), :id => 
id



*******************************************************************
In controller

def search_route
  @query = " "
  if params[:company] != nil and params[:company] != ""
     @query = params[:company].strip
     #...@query = "'\"#...@query}*\"'"

     @community = Community.find_by_name(@query)

 .....

************************************************************
here @community is fetching wrong information.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to