Displaying 20 results from an estimated 400 matches similar to: "Extending Rails plugins?"
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 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 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,
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 Jul 14
5
Acts_As_Taggable Plugin multiple controllers.
I have Acts_As_Taggable Plugin working. I have a HR controller and a
sales controller.
I have a document in hr tagged whitepaper and a differnent document in
sales tagged whitepaper
when I am in hr I see the hr document tagged with whitepaper and not
the sale document (what I want). but if I click on the tag whitepaper
I return two documents, hr and sales. I just want to return the hr
document
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 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 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 Feb 09
0
acts_as_taggable Generating Funky SQL
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 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 Nov 04
2
strange errors in dev.log and webserver log
Hi guys,
I have encountered a strange error in one of my applications.
The details are the following:
The application is a very simple one, I have one model, Cards, it has
some pretty basic stuff, some after_save methods for saving uploaded
files to their places.
I have an UI where I can manage the Card records, with the default
methods, including ''edit''
cards_controller.rb:
2008 Jun 13
1
Polymorphic :through associations
Could someone please help me with this association scheme? I am
familiar with habtm as well as the :through association but this one
has me stumped.
Here is an example DB.
Tags Table:
-------------------------
id
name
Taggables Table:
--------------------------
id
tag_id
taggble_type
taggable_id
For purposes of this example say that there are 2 other tables that
can be tagged and their model
2009 Sep 09
4
Tagging recommendation - acts_as_taggable_on_steroids best?
hey all
What''s the most popular tagging plugin/gem these days? Is it
acts_as_taggable_on_steroids? Or is something else better?
I''d like to basically replicate flickr''s tagging as much as possible, eg
allowing multi-word tags to be denoted by quotes or seperated by commas.
thanks
max
--
Posted via http://www.ruby-forum.com/.
2006 Dec 20
4
undefined method `fullname' for #<User:0x357e380>, BUT works on first view?
Hi all,
Please excuse the long post, but I wanted to make sure you have all the
information....
I have a NewsModel that looks like this:
class News < ActiveRecord::Base
belongs_to :user
validates_associated :user
validates_length_of :title, :description, :minimum => 5, :allow_nil
=> false
acts_as_commentable
acts_as_taggable
def self.find_recent
News.find(:all,
2006 Mar 31
14
[newbi] Create a Model
Hello All,
Yesterday i put RoR with Locomotive. I am very happy :p.
So I follow this tuto
(http://developer.apple.com/tools/rubyonrails.html). I used Sqlite.
my database.yml
# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
# Get the fast C bindings:
# gem install mysql
# (on OS X: gem install mysql -- --include=/usr/local/lib)
# And be sure to use new-style password
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"
2009 Feb 27
2
Getting unique entries from models?
I''m using acts_as_taggable_on and I want to get a list of unique
taggings. How can I do this? In a more general sense, say that I have
a Product model with attributes name and price. I have these:
id: 1
Name: Juice
Price: 5
id: 2
Name: Juice
Price: 5
So when I do a Product.find(:all) I''ll get both, but I only want one.
How can I do this so that no matter now many
2006 Apr 04
5
How to implement tag clouds using plugin?
The code on
http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code
is based on the acts_as_taggable gem,anybody has done that using the
acts_as_taggable plugin?thanks!
btw:the code above uses the tag_count method,which is defined in the
gem:
def tags_count(options = {})
options = {:order => ''count DESC''}.merge(options)
2006 Jun 17
5
STI versus Composition...or the headaches of one big table
Guys,
I have a relationship between model classes that I believe is best
represented by inheritance, but the likelihood that things will change
often is driving us to composition instead.
So, I have a class called Autos, and subclasses called Suvs, Minis,
Mids, Sports, for example.
We have been requested to avoid the STI approach to this, because of
fear of a quickly growing table with
2011 Sep 17
0
joining and array with a table in ActiveRecord
Hey
I am pretty new to Ruby on Rails and I have no idea how to solve the
following:
I have a join query on a table like this:
def mytags
Taggable.joins("JOIN taggables as filter ON taggables.tag_id =
filter.tag_id WHERE filter.taggable_type = ''User'' AND filter.taggable_id
= 1").all
end
this works perfectly fine.
then I want to join the result on another