similar to: Acts_As_Taggable Plugin multiple controllers.

Displaying 20 results from an estimated 600 matches similar to: "Acts_As_Taggable Plugin multiple controllers."

2006 Aug 10
2
search acts_as_taggable for multiple tags
Hey...I''m trying to search a Model that uses acts_as_taggable for multiple tags. I''d like to pass in a search string containing a space delimited tags names (i.e. "tag1 tag2") and return the objects that have been tagged by either one of those. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 May 06
3
Extending Rails plugins?
Gents, I''m using the acts_as_taggable rails plugin (not gem), and would like to add some additional methods to it. For example, the find_tagged_with methods essentially does a find tag in a list (effectively an OR), while I''d like to implement a find_tagged_with_all method that would implement an AND (so if I specified 4 tags, it would only return items that were
2006 Feb 09
3
acts_as_taggable Produces Bad SQL - Find Fails
I am using acts_as_taggable in my application and on the tagging side of things, no problem at all. Running edge Rails and PostgreSQL 8.1. I am then trying to find all my AR objects with a certain tag. The tag is: lasvegas and I know that there are at least 3 records with that tag. So, I''m doing this: @lists = List.find_tagged_with :any => @search_string, :separator =>
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
2006 Sep 27
1
acts_as_taggable with single-table inheritance?
Does anyone have any experience making this work? I installed the plugin and tried the following: class SomeClass < ActiveRecord::Base acts_as_Taggable end class SubClass1 < SomeClass end class SubClass2 < SomeClass end SubClass1.tag_with("tag") and notice that taggable_type = SomeClass when I do SubClass2.find_tagged_with("tag") a SubClass1 object is
2006 May 21
2
acts_as_taggable and single table inheritance
I''ve set up a couple of STI models like such that we get something like this... class A < AR:Base class B < A acts_as_taggable class C < A acst_as_taggable (using the acts_as_taggable plugin) I can tag things just fine this way, the problem I encounter is that the taggings are listed with the base class ("A") and not the appropriate subclass ("B"
2006 Jun 30
0
find_by_sql not quoting properly (in acts_as_taggable plugin)
I have run into a very strange problem discovered through the use of the acts_as_taggable plugin, but related to quoting/sanitizing the interpolated list in a find_by_sql. Apologies for the length, but I wanted to be complete. ;-) The method from acts_as_taggable.rb is: def find_tagged_with(list) find_by_sql(["SELECT #{table_name}.* FROM #{table_name}, tags,
2007 Jul 24
4
spec''ing helpers that use controller
Hi all, I''m in the process of creating rspecs for my helpers. One of the helpers in app/helpers/application_helper.rb looks like this: def page_name @page_name || "Define @page_name in #{controller.controller_name}::#{controller.action_name}" end The rspec is simply: it "should something" do page_name end
2006 Nov 11
0
acts_as_taggable plugin - paging through tagged model
Hi, I''m using the acts_as_taggable plugin & wanted to page through all a model''s records taggged with a particular tags. i.e. page through all Model records that have been tagged with "artist" I could not work out how to do this with the plugin, so I made the changes outlined below. Did I need to do this..? & does anyone else find this useful?
2006 Jul 25
2
Model relationship confusion ...
Hi all, I''m thinking this must be pretty straightforward, but I''m finding myself kind of going in circles in trying to model a simple "private messaging" app. I have two models: user and message User has many messages Message has a sender (User) has many recipients (Users) I''m at a bit of a loss as to how best define the relationships that occur in
2006 May 07
6
Challenging SQL for you...
Gents, My heads been out of the sql game for too long (or it''s simply too early). I''m trying to extend the acts_as_taggable plugin (note: not gem) so that you can specify a list of tags you''re interested in, and the plugin will return only those items that are tagged with *all* these tags. The plugin uses primarily two tables: tags, to keep all the various tag
2006 Jan 12
3
Looking for server recommendations
We're going to replace an older Solaris7/Netbackup/TapeRobot server with a new Centos box using backup-to-disk-to-tape (probably using Arkeia). The specs are up in the air, but generally: - CentOS/RHEL friendly (3Ware SATA? SCSI?) - 2U/3U/4U-ish form factor - hotswap RAID5 - dual PS, hotswap a plus - USB2.0 port(s) (*) To give you an idea of where I'm starting to look, take a gander at
2007 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
Hi all, I feel like I''m missing something really easy and I''m just not seeing it. I''m using the restful_authentication plugin and have a User model. Uesr has_many :things and Thing belongs_to :user. That''s it. I did a "script/generate rspec_scaffold thing" to generate all the necessary bits. The "rake db:migrate" to create the db. At
2006 Apr 20
5
acts_as_taggable patch 3866 needs some testing
DHH''s acts_as_taggable is now much more usable with this patch. http://dev.rubyonrails.org/ticket/3866 This patch adds scoped finders, documentation, and tests: # Get tags for all articles in a blog @blog.articles.tags # Get tags for articles in a blog published in the last year @blog.articles.tags :conditions => [''published_at > ?'', 1.year.ago] # Get related
2006 Apr 01
3
acts_as_taggable, wrong number of arguments
Hello, When I try: @tagged_items = Problem.find_tagged_with :all => ''kuba'' or @tagged_items = Problem.tags_count :limit => 100 I get this error: ArgumentError in Volume#index wrong number of arguments (2 for 3) RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace
2005 Sep 06
9
acts_as_taggable v4 - Tag Counting Anyone?
ThereĀ“s already a new version of the acts_as_taggable mixin available and look what it is capable of now: # Gets the top 10 tags for all photos Photo.tags_count :limit => 10 # => { ''beer'' => 68, ''wine'' => 37, ''vodka'' => ''22'', ... } # Gets the tags count that are greater than 30 Photo.tags_count :count =>
2006 Jan 30
2
:condition not being applied
I am using acts_as_taggable and everything seems to be working except that :condition => "tags_resources.portal_id=#{portal_id}" is not being applied. @resource_pages = Paginator.new self, Resource.find_tagged_with(:any => tag, :condition => "tags_resources.portal_id=#{portal_id}").length, 25, @params[''page'']; @resources
2006 Jun 21
7
acts_as_taggable and paginate?
Hi there, I''ve been trying to paginate over a list of members that all share a tag in common using the acts_as_taggable plugin. The regular way of paginating over a collection doesn''t seem to work with acts_as_taggable. Here''s what my method looks like that takes in a tag name, finds all the members that share the tag and then displays all the members. Nothing too fancy
2006 Nov 01
17
So how can I rewrite my app without using with_scope?
So, I hear that with_scope is going to be deprecated. Which is a bit of a shame, given the stuff I''ve been writing recently. I have a CMS with multiple clients. A ''client'' is essentially a company, with multiple users. Content on the site belongs to a client - content could be messages, images, schedules, etc etc. People belonging to one client should not be able
2006 Jun 02
1
Sorting records from acts_as_taggable plugin
I am using the acts_as_taggable plugin, which works rather nicely by the way. My question is this: When using find_tagged_with, how do I sort the resultant data? It is currently sorting based on the "id" of the record. For instance, I have posts, with tags. If I want to find all posts tagged with "RubyOnRails" it displays them, but not in chronological order, they are