List Info

Thread: fixed problem with find_all_by_tags method in Article model




fixed problem with find_all_by_tags method in Article model
user name
2007-12-30 23:15:02
I noticed that browsing to /tags/foo correctly showed all
articles
tagged 'foo' but did not correctly retrieve each article's
tags from
the database.  Instead the tag 'foo' would be shown as the
lone tag
applied to an article.  I think I've worked out the issue
and created
the following patch:

http://pastie.caboo.se/
133434

[credit]
I can't take credit for the code, it's a few tweaked lines I
grabbed
from the "acts_as_taggable_on_steroids" plugin. 
(http://
agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
)

Also, this problem was previously referenced in this
discussion:
http://groups.google.com/group/Mephist
oBlog/browse_thread/thread/f1ab170d4c5b90ad/b85bae3f451db526
?lnk=gst&q=tags#b85bae3f451db526

[shortcomings]
It seems to be a tad slower than the previous method.. but
I'm happy
that it works correctly.

Please be kind, this is my first patch submission, though I
did read
the posting rules so I believe I submitted correctly.

n8
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


fixed problem with find_all_by_tags method in Article model
user name
2007-12-31 13:35:08
On Dec 30, 2007 9:15 PM, Nate <n8agringmail.com> wrote:
>
> I noticed that browsing to /tags/foo correctly showed
all articles
> tagged 'foo' but did not correctly retrieve each
article's tags from
> the database.  Instead the tag 'foo' would be shown as
the lone tag
> applied to an article.  I think I've worked out the
issue and created
> the following patch:
>
> http://pastie.caboo.se/
133434
>
> [credit]
> I can't take credit for the code, it's a few tweaked
lines I grabbed
> from the "acts_as_taggable_on_steroids"
plugin.  (http://
>
agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
)
>
> Also, this problem was previously referenced in this
discussion:
> http://groups.google.com/group/Mephist
oBlog/browse_thread/thread/f1ab170d4c5b90ad/b85bae3f451db526
?lnk=gst&q=tags#b85bae3f451db526
>
> [shortcomings]
> It seems to be a tad slower than the previous method..
but I'm happy
> that it works correctly.
>
> Please be kind, this is my first patch submission,
though I did read
> the posting rules so I believe I submitted correctly.

Ah, but you forgot a test case 

-- 
Rick Olson
http://lighthouseapp.com

http://weblog.techno-
weenie.net
http://mephistoblog.com

--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


fixed problem with find_all_by_tags method in Article model
user name
2008-01-02 08:29:55
If you guys could update your 'Posting guidelines'  notice
to include
the requirement for test cases I think that would help
newcomers.  It
may be obvious to everyone who is already a contributor, but
I didn't
think about it when I added my patch.  I'll get a test case
working
shortly.

n8

On Dec 31 2007, 2:35 pm, "Rick Olson"
<technowee...gmail.com> wrote:
> On Dec 30, 2007 9:15 PM, Nate <n8ag...gmail.com> wrote:
>
>
>
>
>
> > I noticed that browsing to /tags/foo correctly
showed all articles
> > tagged 'foo' but did not correctly retrieve each
article's tags from
> > the database.  Instead the tag 'foo' would be
shown as the lone tag
> > applied to an article.  I think I've worked out
the issue and created
> > the following patch:
>
> >http://pastie.caboo.se/
133434
>
> > [credit]
> > I can't take credit for the code, it's a few
tweaked lines I grabbed
> > from the "acts_as_taggable_on_steroids"
plugin.  (http://
> >
agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids
)
>
> > Also, this problem was previously referenced in
this discussion:
> >http://groups.google.com/group/MephistoB
log/browse_thread/thread/f1ab...
>
> > [shortcomings]
> > It seems to be a tad slower than the previous
method.. but I'm happy
> > that it works correctly.
>
> > Please be kind, this is my first patch submission,
though I did read
> > the posting rules so I believe I submitted
correctly.
>
> Ah, but you forgot a test case 
>
> --
> Rick Olsonhttp://lighthouseapp.comhttp://web
log.techno-weenie.nethttp://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )