auto_complete problem in ruby 1.9

By , October 8, 2009 10:57 pm

Recently I upgrade my rails version from 2.3.2  to 2.3.4 and ruby version from 1.8 to 1.9 .

By changing version of ruby,  I was facing problem in auto complete functionality.

To solve the issue , I applied below patch in lib/autocomeplete_macro_helper.rb file

def auto_complete_result(entries, field, phrase = nil)
return unless entries
items = entries.map { |entry| content_tag("li", phrase ? highlight(entry[field], phrase) : h(entry[field])) }
content_tag("ul", items.uniq.join)
end

I changed content_tag (“ul”, items.uniq) to content_tag(“ul”,items.uniq.join)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Webnews
  • Digg
  • del.icio.us
  • Reddit
  • Bloglines
  • LinkedIn
  • YahooMyWeb
  • Facebook
  • Google Bookmarks
  • Mixx
  • MySpace
  • Technorati
  • TwitThis

Leave a Reply

*

Panorama Theme by Themocracy