Displaying 20 results from an estimated 1000 matches similar to: "Collect users who posted items with ActsasTaggable on Tag in rails 3"
2010 Jan 05
2
Conditional named_scope chaining with params (Need help)
Hello there,
I have a model that has more then one named_scope.
In my action Index of the controller that handle this model I want to do
this in a drier way:
if params[:ownership] == "mine"
@posts = Post.tagged_with(params[:tags], :on =>
:tags).owner(current_user.id).paginate :all, :page => params[:page],
:order => ''created_at DESC''
else
2006 Mar 03
8
How to use the sortable_element tagname option?
I''m having some difficulty adding drag-and-drop sorting to my
application. I''m hoping that someone can help me figure out what I''m
doing wrong:
#view
<table>
...
<tbody id="item-list-body">
<tr id="view-item-<%= item.id %>"....</tr>
</tbody>
...
<%= sortable_element(''item-list-body'',
2006 Jul 21
2
Abstract insertion question
Hi,
In the following block of Prototype.js when will the catch() block
run? I cannot create conditions in Opera where it will run.
Thanks,
Peter
if (this.element.insertAdjacentHTML) {
/* IE and Opera */
try {
this.element.insertAdjacentHTML(this.adjacency, this.content);
} catch (e) {
// when will this run? can feature detection be used instead?
var tagName =
2006 Apr 27
5
proposing $E & $T
Hey all,
I''ve had these functions for some time now, and would like to offer them
as two new dollar-sign functions - elements to be extended by Prototype
geniuses. :-)
makeText(string) as $T() - return text node element
Does just what it says... I''m sure someone could extend it nicely when
via Prototype.
(example) var x = $T(''hello world'');
2006 Jun 25
1
Having Trouble Using ActsAsTaggable
I''ve installed the acts_as_taggable plugin and modifed it according to
the tutorial form making it user specific
(http://www.slashdotdash.net/blog/articles/2006/04/29/acts_as_taggable-per-user-tagging
).
I keep getting errors when I try to tag things, however, and have traced
the problem to the line of the tag_with function that calls the
find_or_create_by_name function. So I fired
2003 Feb 25
1
How to modify XML documents and save changes
Dear,
I want to read XML documents, add child nodes to some elements and store
everything back as an XML document.
I've tryed the following:
doc <- xmlTreeParse("file.xml")
QTListNode<-xmlElementsByTagName(xmlRoot(doc)[[1]],"tagname")
append.xmlNode(QTListNode[[1]],newXMLNode(name ="Norm", attrs = NULL))
saveXML(doc, file = "out.xml",
2001 Nov 13
1
RODBC
I'm tryuing to get the RODBC package to work with a MS Sql database
(Wonderware's InSQL). I'm able to connect to the database using the
following:
version
_
platform i386-pc-mingw32
arch x86
os Win32
system x86, Win32
status Under development (unstable)
2010 Jan 15
1
Chaining queries in ActiveRecord
Hi all,
Stuck at this problem for several days. Tried to use named_scope,
scope_out, and plugin such as searchlogic, but no result.
The problem is as follows: I have a pic table and tag table, and a
join table called pic_tag (with only pic_id and tag_id) so that I can
associate N pics to M tags. This is the tutorial way to set up a many-
to-many association. I''m trying to implement a
2012 Jul 25
1
submenus and menu title
From
http://www.syslinux.org/wiki/index.php/Comboot/menu.c32
*** QUOTE - BEGIN ***
MENU BEGIN [tagname]
MENU END
Begin/end a submenu. The entries between MENU BEGIN and MENU END form a submenu, which is marked with a > mark on the right hand of the screen. Submenus inherit the properties of their parent menus, but can override them, and can thus have their own
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 16
0
Bug in script.aculo.us Draggable in 1.5
I have a Draggable object that contains a SELECT with some OPTION tags.
When I select one of the OPTION tags, the entire Draggable acts as
though it is being dragged.
There is code in the Draggable object to stop this for Firefox:
initDrag: function(event) {
if(Event.isLeftClick(event)) {
// abort on form elements, fixes a Firefox issue
var src =
2007 Jul 26
1
Prototype 1.5.1.1. bug, "too much recursion" line 1294
FYI, just tried to upgrade my prototype from 1.5.something to 1.5.1.1
and when I did an ajax based form submission, I my browser pegged the
CPU. FireBug tells me there is too much recursion online 1294:
if (!element || !element.tagName || element.nodeType == 3 ||
I don''t have enough time to submit a proper bug report but wanted to
let people know.
2007 Dec 04
1
patch for oggz-comment
Hi,
It seems the oggz-comment on your computer has more features than the
one you sent in August :-) Any chance you could send a more recent
copy?
In any case, I've updated the --help output for the -s option, and
also added a manual page with the same info, in
doc/oggz-comment.1.sgml (in svn.annodex.net changeset:3280).
cheers,
Conrad.
On 07/11/2007, Kangyuan Niu
2005 Nov 07
2
question about Effect.Highlight and IE 5.5
I''ve recently begun testing some of the scriptaculous functionality in
IE 5.5, since my company wants me to support as many browsers as
possible. When I do an Effect.Highlight on a <tr>, it doesn''t quite
work right. I''ve figured out a few things, but I''m not sure whether you
want to change them or not. Here''s what I know:
In
2008 Apr 18
1
element has no properties error.
Hey all,
I''ve recently started messing around with Prototype again, so I
thought I''d start small and write 5 lines of code that would check if
all fields in a form are filled out. So I thought
document.observe(''dom:loaded'', function() {
$(''submNewUser'').disable();
new Form.Observer($(''newUser''), 0.3, function(e, val) {
2006 Mar 02
3
Modifying "Find" to always add a condition?
I''d like to always add a condition to any version of "find" (e.g.
Thing.find(), Thing.find_by_name(), Thing.find_by_whatever) so that in
addition to whatever conditions are set, an additional condition is set
:conditions=>"user_id=#{current_user.id}"
I''d like to make sure that a user only sees/edits/creates entries in the
database that have the user_id
2010 Jun 24
0
Using searchlogic with acts_as_taggable_on
Hi,
i have 2 model, Merchant and Items and using acts_as_taggable_on
Merchant has_many Items, and i try to find Merchant with search logic
including the tags
class Merchant < ActiveRecord::Base
acts_as_taggable
has_many :items
end
class Item < ActiveRecord::Base
acts_as_taggable
belongs_to :merchant
end
This works
>> Merchant.tagged_with(''Tag 1'')
but
2006 Jun 16
4
duplicate entry issue in acts_as_taggable gem
Hi,
I am using the ''acts_as_taggable'' gem and have issues when I try to
''tag'' an entity with a ''tagname'' already defined.
i.e
1) book[1].tag(''science'',''paperback'') --> works fine
2) book[2].tag(''roman'',''physics'',''paperback'') --> creates an
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
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
Note that this does not fix gettext for app,
that will be done separately in another patch
as F10/F11 require different setups for that.
In the meantime gettext works if manually changed
in environment.rb to gettext_rails instead of
gettext/rails
Signed-off-by: Jason Guiditta <jason.guiditt at gmail.com>
---
src/app/controllers/application.rb | 200 --------