Suppose that acts_as_taggable need three models: Tag, Tagging, Article Could tag search be realized using acts_as_ferret? Suppose tags:"a","ab","abc",If i wanted to get all the articles with tag name including "a", Could ferret satifisy this requirement? -- Posted via http://www.ruby-forum.com/.
David Balmain
2006-Oct-09 22:58 UTC
[Ferret-talk] How could acts_as_taggable work with ferret?
On 10/10/06, Glsio <Glsio.vip at gmail.com> wrote:> Suppose that acts_as_taggable need three models: Tag, Tagging, Article > > Could tag search be realized using acts_as_ferret? > Suppose tags:"a","ab","abc",If i wanted to get all the articles with tag > name including "a", Could ferret satifisy this requirement? >Yes, no problem at all. You just need to make sure that the tag field is included in the index for the Article model. Dave
David Balmain wrote:> On 10/10/06, Glsio <Glsio.vip at gmail.com> wrote: >> Suppose that acts_as_taggable need three models: Tag, Tagging, Article >> >> Could tag search be realized using acts_as_ferret? >> Suppose tags:"a","ab","abc",If i wanted to get all the articles with tag >> name including "a", Could ferret satifisy this requirement? >> > > Yes, no problem at all. You just need to make sure that the tag field > is included in the index for the Article model. > > DaveHi,Dave Can you show me example? very grateful. Glsio -- Posted via http://www.ruby-forum.com/.
Glsio wrote:> David Balmain wrote: >> On 10/10/06, Glsio <Glsio.vip at gmail.com> wrote: >>> Suppose that acts_as_taggable need three models: Tag, Tagging, Article >>> >>> Could tag search be realized using acts_as_ferret? >>> Suppose tags:"a","ab","abc",If i wanted to get all the articles with tag >>> name including "a", Could ferret satifisy this requirement? >>> >> >> Yes, no problem at all. You just need to make sure that the tag field >> is included in the index for the Article model. >> >> Dave > > Hi,Dave > Can you show me example? very grateful. > > GlsioHi... All these to ur model acts_as_taggable acts_as_ferret :fields => ["field1", "field2", :tag_list] Take care of one thing ur page should not have any tabs..replace all tabs by spaces -- Posted via http://www.ruby-forum.com/.