Article View: pl.comp.lang.ruby
Article #258acts_as_ferret i highlight, czy komus udalo sie uzyskac cos innego niz nil?
From: thinval
Date: Wed, 25 Oct 2006 15:02
Date: Wed, 25 Oct 2006 15:02
34 lines
1448 bytes
1448 bytes
witajcie,
pytanie bardziej railsowe niz konkretnie odnosnie samego jezyka,
ale moze ktos bedzie potrafil mi pomoc...
czy udalo sie komus was uruchomic podswietlanie w wynikach wyszukiwania,
zwroconych przez ferret/acts_as_ferret?
class Foo < ActiveRecord::Base
acts_as_ferret :fields => [ 'name', 'text' ]
end
i teraz
>> ppp = Foo.find(:first)
ppp = Foo.find(:first)
=> #<Foo:0x342cd24 @attributes={"name"=>"kontakt", "text"=>"to jest
testowy tekst"}>
?> ppp.name
ppp.name
=> "kontakt"
>> ppp.highlight('testowy')
ppp.highlight('testowy')
=> []
czy to jakis blad, czy ja robie cos nie tak?
Foo.find_by_contents dziala o.k.
pozdrawiam serdecznie
t.
Technical Details
Message-ID:
<ehnu9j$rs6$1@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: thinval <thinval@go2.pl> Newsgroups: pl.comp.lang.ruby Subject: acts_as_ferret i highlight, czy komus udalo sie uzyskac cos innego niz nil? Date: Wed, 25 Oct 2006 17:02:11 +0200 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 34 Message-ID: <ehnu9j$rs6$1@inews.gazeta.pl> NNTP-Posting-Host: tyra.jak.wol.w.omnigence.com Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1161788531 28550 195.164.48.94 (25 Oct 2006 15:02:11 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Wed, 25 Oct 2006 15:02:11 +0000 (UTC) X-User: erin5 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit