Thanks for the work around Soinic. Let me know when you get it fixed as I think it will be a useful plugin and I don't mind testing it.
cheers, DAZ On Oct 26, 6:59 pm, Piotr Solnica <[email protected]> wrote: > Actually you're right. I can reproduce that behavior. As a workaround > you can just do post.reload after you tag/untag it. I'll try to fix it > ASAP! > > On Oct 24, 11:05 pm, DAZ <[email protected]> wrote: > > > > > I'm getting other problems too: > > > post.tag! ["blue","yellow"] > > > irb(main):026:0> post.tag! ["blue","yellow"] > > => [#<PostTag @id=1 @tag_id=1 @post_id=1>, #<PostTag @id=2 @tag_id=2 > > @post_id=1>, #<PostTag @id=3 @tag_id=3 @post_id=1>, #<PostTag @id=4 > > @tag_id=4 @post_id=1>] > > irb(main):027:0> a.tags > > => [] > > irb(main):028:0> a.tag_list > > => "red,green" > > irb(main):029:0> Tag.all > > => [#<Tag @id=1 @name="red">, #<Tag @id=2 @name="green">, #<Tag @id=3 > > @name="blue">, #<Tag @id=4 @name="yellow">] > > irb(main):030:0> a.tag_list > > => "red,green" > > irb(main):031:0> a.untag! > > => [] > > irb(main):032:0> a.tag_list > > => "red,green" > > > There seems to be a discrepancy between the tag_list and tags methods. > > > .... although on previous performance today, it might just be me, so > > just checking before I file an issue on github. > > > cheers, > > > DAZ > > > On Oct 24, 9:52 pm, DAZ <[email protected]> wrote: > > > > Thanks for the reply solnic, > > > > I've just had another try at dm-tagging and there was no error this > > > time, so the error was probably in the chair earlier! > > > > Just a few things though: > > > post.tags keeps returning an empty array which doesn't seem right. > > > irb(main):002:0> a = Page.new > > > => #<Post @id=nil @name=nil> > > > irb(main):003:0> a.name = "Test" > > > => "Test" > > > irb(main):004:0> a.save > > > => true > > > irb(main):005:0> a.name > > > => "Test" > > > irb(main):006:0> a.tag_list = "red,green" > > > => "red,green" > > > irb(main):007:0> a.save > > > => true > > > irb(main):008:0> a.tags > > > => [] > > > irb(main):008:0> a.tag_list > > > => "red,green" > > > irb(main):023:0> Tag.all > > > => [#<Tag @id=1 @name="red">, #<Tag @id=2 @name="green">] > > > > So a.tag_list returns a string, but a.tags doesn't seem to return the > > > array of tags like it says in the docs. Just wanted to check if this > > > is right or not before raising it as an issue. > > > > Also, is there going to be a separator option soon? (I'd prefer to > > > have space separated tags) > > > > I'll keep playing around with it. > > > > Thanks again, cheers, > > > > DAZ > > > > On Oct 24, 8:30 pm, Piotr Solnica <[email protected]> wrote: > > > > > Hi, > > > > > You should use dm-taggings as I'm working on them and can offer help > > > > and I'm definitely going to support it since I'm using it in my > > > > projects. dm-tags will probably be replaced by dm-taggings at some > > > > point as it no longer has a maintainer and people haven't been happy > > > > with it anyway. > > > > > Regarding the error you're getting please report an issue on github > > > > with a full backtrace and a description of your environment. I will > > > > fix this is as soon as possible. > > > > > dm-taggings issue tracker is > > > > here:http://github.com/solnic/dm-taggings/issues > > > > > Cheers, > > > > > # solnic > > > > > On Oct 24, 9:22 pm, DAZ <[email protected]> wrote: > > > > > > Hi, > > > > > > I've been trying to find a plugin that does tagging for DM. So far > > > > > I've tried the following: > > > > > > dm-tags > > > > > dm-taggings > > > > > > I can't get these to work at all so far for the following reasons: > > > > > dm-tags (saves tags at first then will not update any tags on > > > > > subsequent updates) > > > > > dm-taggings (error message: /usr/lib/ruby/gems/1.8/gems/dm- > > > > > taggings-0.11.0/lib/dm-taggings/is/tagging.rb:1:TypeError: Tagging is > > > > > not a module) > > > > > > Even if they do, they don't seem to support different separators for > > > > > the tags. Has anybody got these working or got any suggestions of a > > > > > decent tags plugin for DM? > > > > > > cheers, > > > > > > DAZ -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
