Displaying 20 results from an estimated 1000 matches similar to: "Per activerecord object callbacks (aka: should I have gone to bed hours ago?)"
2004 Jul 26
5
aggregate function
Hi all,
I have the folowing frame(there are more columns than shown),
1 2 3 4 5
Year Total Tus Whi Norw
1994 1.00 1830 0 355
1995 1.00 0 0 0
1995 1.00 0 0 0
1995 1.00 4910 4280 695
1997 1.00 0 0
2007 Apr 23
3
Troubles with using gems in Rails
Hi!
I''m observing some problems using gem inside Rails. My understanding is
that after following sequence in irb:
$ irb
irb(main):001:0> require ''rubygems''
=> true
irb(main):002:0> require ''active_record''
=> true
irb(main):003:0> gem ''acts_as_taggable''
=> true
I should have access to acts_as_tagable mixins, like:
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
2004 Jul 27
1
list problem
Hi all,
I have the folowing frame(there are more columns than shown),
1 2 3 4 5
Year Total Tus Whi Norw
1994 1.00 1830 0 355
1995 1.00 0 0 0
1995 1.00 0 0 0
1995 1.00 4910 4280 695
1997 1.00 0 0
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
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 Dec 28
3
acts_as_taggable query
Hi ,
I couldnt find any mailing list for this nice plugin so I hope this is not
off topic.I just have a basic question here.
I already had created a table and a model for the tags and items and the
join table and now want to use this plugin but I just cant seem to figure
out how to make it use my table instead of the default.
class Tag < ActiveRecord::Base # already exists and has the
2004 Sep 10
1
Query on image link file mode?
Hiya,
will it be possible to add single song playback support like Monkey's Audio
Image Link File to FLAC+CUE? This will allow the playing of single songs
from 1 large FLAC file.
Since FLAC can already embed the cuesheet inside the FLAC itself, the next
step will be to allow the playback of the songs individually, allowing them
to be added to playlists when playing singles. Please make
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 %>
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
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
1997 Oct 08
2
OPLOCKS....
Hi, I have an application under Access that is running dead slow. I've
done some testing and it appears that Access really likes to use OPLOCKS which
of course Samba does not support.
Is there any work underway to get Samba to support OPLOCKS? I know they are
difficult to implement but I'm faced with a decisions now to buy an NT box
(Ugh!) or do a lot of messing around to get this
2005 Sep 06
6
strange behavior of acts_as_taggable
I was testing my models with this new library and I got:
>> s.tag "warp"
ActiveRecord::StatementInvalid: ERROR: inserción o actualización en la tabla
«tags_stories» viola la llave foránea «tags_stories_story_id_fkey»
DETAIL: La llave (story_id)=(8) no está presente en la tabla «stories».
: INSERT INTO tags_stories ("tag_id", "story_id") VALUES
2011 Mar 15
1
Acts as taggable on ( tag ownership question )
From the acts as taggable doc I seeTag Ownership
Tags can have owners:
class User < ActiveRecord::Base
acts_as_tagger
end
class Photo < ActiveRecord::Base
acts_as_taggable_on :locations
end
@some_user.tag(@some_photo, :with => "paris, normandy", :on => :locations)
@some_user.owned_taggings
@some_user.owned_tags
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],
2007 Jan 19
0
Acts_as_taggable (the gem) woes (solved)
Hi,
I had to battle quite a bit to find how to load acts_as_taggable
without using require_gem.
where I previously had
require_gem ''acts_as_taggable''
I tried replacing by the obvious
gem ''acts_as_taggable''
require ''acts_as_taggable''
this failed miserably. The trick is that the acts_as_taggable module
is in a file named taggable in the lib
2007 Nov 29
0
has_many_polymorphs for user owned tags
Hi all,
I''m trying to extend the tagging functionality of has_many_polymorphs to
work with user owned tags - ie, putting belongs_to :user in the Tagging
model.
So I changed the index in the generated migration, and added user_id to
the taggings table.
Then I added belongs_to :user in the Tagging model.
In the lib/tagging_extensions.rb file I added a new function:
def
2008 Oct 02
1
acts_as_taggable_on environment issues
Like most people, I''ve got two machines: one for development and one
for production. I''ve done everything I can to make sure the ruby/rails
environments are the same, but of course they''re not identical (I''ll
get into that in a moment). The error that I''m getting happens when I
call a method in a background task controller on the production
machine; I
2007 Feb 21
1
login and plain-md5 in sql query
i use last dovecot rc23 with users/passwords in mysql
1) How can i define a sql query for each auth mechanism ?
2)Why i can't set "default_pass_scheme = login" in my dovecot-sql.conf? :
dovecot: Feb 21 09:46:22 Info: auth(default): client in: AUTH 1
PLAIN service=IMAP secured lip=127.0.0.1 rip=127.0.0.1
resp=AGFkaUBhZHJpYW4uZXUAcGFyb2xh
dovecot: Feb 21
2010 Sep 19
2
Two mux-fix patches against current liboggz
Two bugs in liboggz mux ordering bit me tonight. These are patches
against current GIT, I'll apply if no one else volunteers, but I'd
prefer a quick review. I'm surprised they'd not been caught, as it
was causing oggz-sort/oggz-merge to mis-mux potentially all files
containing theora (the frame->time calculation accounted for stream
version backwards, and the result was always