Displaying 20 results from an estimated 100 matches similar to: "acts_as_taggable help"
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
2014 Nov 02
1
Building R package: “Found 'rand', possibly from 'rand' (C)” NOTE when checking package
I am building a package that makes a simple visualization. A part of
the code is in C++, and utilizes the functions srand() and rand() for
purposes not related to statistics (introducing random noise in the
visualization). The package compiles without problems on my
workstation(s), but when I submitted it to the winbuilder service, I
got the following weird message:
* checking compiled code ...
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 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 17
6
acts_as_taggable confused
Ahoy,
So i''ve installed the acts_as_taggable module and everything is fine,
but i''m a bit confused about this bit of code described in the API
"photo = Photo.new
# splits and adds to the tags collection
photo.tag "wine beer alcohol"
# don''t need to split since it''s an array, but replaces the tags
collection
# trailing and leading
2005 Dec 16
1
acts_as_taggable sql injection vulnerability
Hey everyone!
If you''re using acts_as_taggable <= 1.04, (erm, any version, I
think..) please fix your local copy right now! There are numerous sql
sanitization holes in this library.
I notified Obie of this over a month ago, so hopefully he''s fixed it.
How to tell lif you''re vulnerable
======================
Make a tag with a single quote in it. See if raises an
2006 Aug 05
3
Four Days on Rails
I''ve been reading the tutorial and I have problems with the TinyInt(1) for the attribute "item.done". I thought this thread would be the best to post it. I''m using Rails 1.1.14. When in the partial template _list_stripes appears:
<%= list_stripes["done"] == 1 ? show_image("done_ico.gif") : " " %>
it always returns the
2006 Feb 24
1
Help a n00b?
So I''m trying to do that hot new thing with AJAXy forms:
http://idiet.toasterwaffles.com/foods/list
Here''s the relevant code in list.rhtml (for the form portion)
<tbody>
<%= render_collection_of_partials "list_stripes", @foods %>
</tbody>
<tfoot>
<tr id="addFood"><%= form_remote_tag( :html =>
2006 Apr 25
3
belongs_to and has_many
I know this has been rehashed many times, but I don''t get it.
I can''t find it documented to were I understand all the parts. I can
make this work using Rails database design conventions, but in this case
I am not able to do that.
I find examples, but the ones I find do not follow the conventions.
They also do not give enough information to understand what is going on.
In
2006 Feb 28
2
acts_as_taggable and auto_complete
I''m using the acts_as_taggable gem (who''s site has gone AWOL
apparently) and I''m wanting to make it autocomplete. I, however, am
the absolute worst JavaScript person ever, so is there anyone out
there that can point me to a tutorial or give some good starting
points? Thanks!
Kenneth
--
=> the blog from beyond <=
=> www.eyeheartzombies.com <=
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 23
2
del.icio.us-like output
I''m trying to build a page similar to a delicious page that is a listing of
your bookmarks in this format:
1. Querying serialized data in
ActiveRecord<http://www.karmiccoding.com/articles/2005/11/29/querying-serialized-data-in-activerecord>
Hack
to search serialized fields
to rails <http://del.icio.us/djsodom/rails> ... and 4 other
2005 Sep 03
13
acts_as_taggable v2 - Tagging on Steroids
Hi folks,
Thanks to the community feedback on the 1st version, I''ve come up with a
much improved version of the acts_as_taggable mixin.
There´s some piece of the action here:
http://dema.ruby.com.br/articles/2005/09/03/tagging-on-steroids-with-rails
Cheers
Dema
--
http://dema.ruby.com.br - Rails from a .NET perspective
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 13
0
count_as_taggable distinctly
I needed to count tagged records, I came up with this:
<pre>def count_tagged_with(options = {})
options = { :separator => '' '' }.merge(options)
tag_names =
ActiveRecord::Acts::Taggable.split_tag_names(options[:any] ||
options[:all], options[:separator])
raise "No tags were passed to :any or :all options" if
tag_names.empty?
2006 Apr 26
3
acts_as_taggable gem: deleting tags
I have the following quick-and-dirty hack in my model:
def after_destroy
# search for orphaned tags and delete them
orphans = Resource.tags_count :count => ''= 0''
orphans.keys.each {|tag| Tags.find_by_name(''tag'').destroy}
end
It''s nice from a readable code perspective, but it seems inefficient -
is there some way to do this with only one
2006 Mar 28
2
add_limit (in acts_as_taggable) breaks in 1.1, solution?
Upgraded from Rails 1.0 to 1.1 and found that the (slightly modified)
acts_as_taggable plugin breaks. The line
add_limit!(sql, options)
(in the tags_count method) causes this error
wrong number of arguments (2 for 3)
The documentation still says it takes two args, so I''m not sure what''s
wrong. Adding
logger.info("SQL here: " + sql)
2006 Mar 21
2
SQL bug in acts_as_taggable
Hi,
excuse me if this is off-topic and feel free to ingore it in case.
I''m using acts_as_taggable (the gem version) and found what to me
looks like a bug in this code from the method tags_count:
sql = "SELECT #{t}.#{t_pk} AS id, #{t}.name AS name, COUNT
(*) AS count
FROM #{jt}, #{o}, #{t} WHERE #{jt}.#{t_fk} = #{t}.#{t_pk}
AND #{jt}.#{o_fk} =
2006 Jun 22
1
acts_as_taggable gem problems
With acts_as_taggable 1.04...
1. how can I get a frequency of tags?
i.e. /tags/list I want to list of tags sorted and listed with
their frequency
tags_controller.rb:
def list
@tags = Tags.find_by_sql ''select name, count(*) as freq from tags
group by name order by freq desc''
End
tags/list.rb:
<ul>
<% @tags.each do |t| %>
<li><%= t.freq %>
2012 Apr 18
1
has_and_belongs_to_many: Item Already in Collection?
I''m putting together what should be a simple app using content and
tags
using has_and_belongs_to_many for each.
create_table :contents_tags, :id => false do |t|
t.references :content
t.references :tag
end
When a user tries to add a new tag, I''m trying to detect if the
content already has the tag.
So ... I grab the tag like this:
tag =