similar to: has_many_polymorphs for user owned tags

Displaying 20 results from an estimated 2000 matches similar to: "has_many_polymorphs for user owned tags"

2008 Sep 26
0
self-referential tags, has_many_polymorphs
Hi, I''m looking to add tagging to an application, and I would like to allow self-referential tags, so that I can tag my tags. With the goal of generating a flexible tag hierarchy. After some googling it looks like acts_as_taggable is not the best piece of code, and I''m hoping to use the has_many_polymorphs plugin from http://github.com/fauna/has_many_polymorphs/tree/master.
2009 Nov 12
0
Problem with has_many :through, :uniq => true with polymorph
Didn''t have quite enough space to describe it there...basically i''m having a problem with the :uniq option in my tags. I''m using acts_as_taggable_on_steroid which adds these associations to my Resource class: Resource has_many :taggings, :as => :taggable, :dependent => :destroy, :include => :tag has_many :tags, :through => :taggings, :uniq => true
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my problem: 4 models : Collection, Page, Fragment, Belonging (which is the join table): 1 class Collection < ActiveRecord::Base 2 has_many_polymorphs :elements, 3 :through => :belongings, 4 :from => [:pages, :fragments, :collections], 5 :as => :collector, 6 :parent_order =>
2008 Mar 05
4
has_many_polymorphs is breaking my spec file
Hey folks I have a bunch of classes that are polymorphs, with has_many_polymorphs (they are all ''labellable'', which is similar to being ''taggable'' in the acts_as_taggable scheme). I have a couple of modules, LabellableInstanceMethods and LabellableClassMethods in a file called labellable_methods.rb. The classes all get labelled with
2006 Apr 28
1
acts_as_taggable help
Ahoy, having a bit of difficulty w/ the acts as taggable GEM. I was able to create a tagcloud, but now i want to filter items by tags. in my controller i have def show_tagged_with <-- snip snip --> @items = Item.find_tagged_with( :any => params[:tag_name]) @categories = Category.find_all @tag_name = params[:tag_name] @tagged_items = Item.tags_count(:limit
2008 Feb 11
3
Should there be trouble w/has_many_polymorphs in a plugin?
Folks, As much as I like generators, I''d greatly prefer to just throw my has_many_polymorphs tagging and commenting engines into projects as plugins. However, after transplanting my tag.rb and tagging.rb files into the lib folder of a ''has_many_tags'' plugin and adding the obligatory plugin requirements (init.rb and an include in environment.rb), I''m not having
2006 Feb 12
7
ROR Recipes Beta: Why use taggings instead of tags_contacts? NoMethodError tag_with?
I have gotten acts_as_taggable to work for a test application as documented on taggable.rubyforge.org I am following Chad''s excellent examples in ROR Recipes Beta book. I have a few questions and hope that Chad or some other expert can help clarify them. 1. Why is the book suggesting to use taggings table instead of tags_contacts, as mentioned on taggable.rubyforge.org?
2006 Apr 06
0
How to use polymorphic in a beautiful way in such a case?
class User<ActiveRecord::Base has_many :taggings, :as=>:taggable,:dependent=>true has_many :tags,:through=>:taggings end class Article<ActiveRecord::Base has_many :taggings, :as=>:taggable,:dependent=>true has_many :tags,:through=>:taggings end class Tagging<ActiveRecord::Base belongs_to :tag belongs_to :taggable,:polymorphic=>true end class Tag<ActiveRecord::Base
2008 Mar 05
0
Overloaded has_many_polymorphs method is still being called
I have a has_many_polymorphs class called Property. For the various classes that are polymorphs, i''ve written a module with methods relating to Property, that they can all include. One of my methods is called ''add_properties'': it creates some new associations, but also does a couple of other things (such as update the object''s ferret index, and return a
2010 Aug 19
3
Help: "500 Internal Server Error"
Hi guys, I am a completely ruby & rails newbie. i have being struggling on this issue for almost 2 days, still can not figure out the problem. there are two websites i''m trying to set up a development environment on my pc running windows xp 32 bit version. a front-end customer facing page & back-end admin page. the procedure i have gone through is: 1. install ruby version 1.8.6
2007 Feb 04
2
Per activerecord object callbacks (aka: should I have gone to bed hours ago?)
First of all, I should have gone to bed a long time, so please be forgiving with regards to what will follow :) So I''ve been working all day on a rails project that needs to go out soon, and I thought I would try to refactor a has_many relationship to a has_and_belongs_to_many relationship (using has_many :through). However, I then realized that I would loose a lot of the simple beauty
2006 Feb 26
5
Help On Associations Extension.
Hi to all, I''m needing some help here ... I want to do an extension on a has_and_belongs_to_many to build a custom add method to the association. i have a table locations that has a many-to-many association with a tags tabel using a locations_tags table. i want to add a method to the Location has_and_belongs_to_many association so that i can do something like this on the location
2006 Apr 20
2
acts_as_taggable magic.... please explain
Hi, There is a line in acts_as_taggable plugin: send(acts_as_taggable_options[:from]).tags.find_or_create_by_name(name).on(self) could someone explain what is: send(xxx) and .on(self) I cannot find it rDoc -- Posted via http://www.ruby-forum.com/.
2010 Mar 23
1
has_many_polymorphs with searchlogic
Has anyone been able to use searchlogic with has_many_polymorphs? Are they compatible? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2006 May 19
0
Works in model but not in mixin
Disclaimer: RoR newbie. Using the acts_as_taggable plugin. As an exercise I wanted to switch from the destructive TAG_WITH method to adding tags while preserving the existing ones. On the surface this seemed easy enough and eventually I got it working. However, the following method: def add_tags(list) Tag.transaction do Tag.parse(list).each do |name| if
2006 Apr 21
3
polymorphic,has_many through can not work?
Josh Susser tells in his blog that the opposite direction of polymorphic will get into trouble together with has_many through. This is the url: http://blog.hasmanythrough.com/articles/2006/04/03/polymorphic-through I do that according to Josh Susser''s procedure: class Tagging < ActiveRecord::Base belongs_to :tag belongs_to :taggable, :polymorphic => true belongs_to
2006 May 12
2
Problem regarding accessing attributes from object...
Hi, I have an object (@cnt). Now when I am calling "@cnt.inspect" on object it gives me output as follows:- ----output---- [#"3"}>] ----------- Now in aboove output the number between double quotes (3) which is of my interest & I want to display it. How to do that? Actually this is my method:- ==================================== class Tagging < ActiveRecord::Base
2009 Sep 11
0
Need help with extending a plugin
hey folks I''ve installed the plugin acts_as_taggable_on_steroids (henceforth aatos), and i already have some tagging functionality set up, using the same approach (ie a Tag and a Tagging class with associated tables) as aatos. So, i want my existing Tag and Taggings methods, plus some other methods i have in a module which i include with the taggable classes (ie the ones that would call
2006 Feb 28
0
acts_as_taggable vulnerable to attacks ?
Hi all ! I''d like to confirm if I''m reading correctly. It seems ActiveRecord::Acts::Taggable::SingletonMethods#find_tagged_with is vulnerable to SQL injection attacks: def find_tagged_with(options = {}) options = { :separator => '' '' }.merge(options) tag_names = ActiveRecord::Acts::Taggable.split_tag_names(options[:any] || options[:all],
2006 Feb 16
1
[PATCH] acts_as_taggable plugin
hi, I started today to use the acts as taggable plugin and it''s working as expected. I added a method find_tagged_with_all since I needed to find the elements tagged with all the items in a list while find_tagged_with finds all the elements tagged with any of the list terms. Attached to this mail there''s a patch which adds the find_tagged_with_all method and which solves a