search for: tag_with

Displaying 17 results from an estimated 17 matches for "tag_with".

2007 Jul 22
2
Seek brilliant Rails programmer to add one field to acts_as_taggable
...hat requires an additional integer field to be added to the tag.rb in acts_as_taggable. I feel I have a good understanding of ActiveRecord and have performed the correct migrations. (As a short background for those following this thread) when one wants to add tags to a model they call the ''tag_with'' method that jumps into acts_as_taggable.rb logic and attaches one or more tags to the controlling model. The part that kills me is that this procedure happens in such a sublime manner that I can''t see where or when the record is created or built? Thus I can''t find a plac...
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
2006 Feb 12
7
ROR Recipes Beta: Why use taggings instead of tags_contacts? NoMethodError tag_with?
...s table instead of my tags_contacts? 3. How can I store additional fields such as member_id in the tags_contacts table or taggings table? 4. When I follow Chad''s example on my Favorite class, (with tags_favorites and taggings table created) I keep getting the NoMethodError for "tag_with"? At first I thought this may be because I am using taggings table but then when I created tags_favorites table the error persisted. 5. I finally used the tag method as described on rubyforge.org and it works. So my question is, is tag_with a typo in the book or am I missing something?...
2006 Apr 03
5
Newbie question about acts_as_taggable
I installed the acts_as_taggable plugin that DHH wrote. Now I have met problems on using it: class Book < ActiveRecord::Base acts_as_taggable end mybook = Book.new mybook.tag_with(''red library book'') But the system tell the wrong message: undefined method `parse'' for Tag:Class d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1123:in `method_missing'' #{RAILS_ROOT}/vendor/plugins/acts_as_taggable/lib/acts_as_tag...
2008 Feb 26
1
problem with posting with acts as taggable on steroids
hi all i''m trying to have a post with tags included but i''m getting undefined method `tag_with'' i''ve already added acts_as_taggable to the model and on the controller the code for creating the post is: def create @post = Post.new(params[:post]) @post.tag_with(params[:tag_list]) @post.user = current_user if @post.save redirect_to root_url els...
2006 Aug 07
3
Acts_as_taggable / Rails Recipes bug?
...n attribute in the Model that accepts a string of space delimited tags. The book uses tag-_list, but from what I can tell this attribute can''t be written to. I''ve added this to the plugin code itself - am I missing something, is there a better way? def tag_list=(s) self.tag_with(s) end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/14801ed2/attachment.html
2006 Apr 07
1
Acts_as_Taggable
A couple of quick acts_as_taggable (the Rails 1.1 plugin version) 1. Can you update tags on an existing record? If I execute the tag_with statement twice it creates two rows in the taggings column, instead of updating the value of the existing tag 2. Can you delete tags? I didn''t see a method for this. If I can delete tags, problem #1 goes away. scott. ------------------------------------------------------------------...
2006 May 19
0
Works in model but not in mixin
Disclaimer: RoR newbie. Using the acts_as_taggable plugin. As an exercise I wanted to switch from the destructive TAG_WITH method to adding tags while preserving the existing ones. On the surface this seemed easy enough and eventually I got it working. However, the following method: def add_tags(list) Tag.transaction do Tag.parse(list).each do |name| if acts_as_taggable_options[:from] sen...
2006 Jun 13
11
markaby
What''s the current status of Markaby? I''ve played with it a bit and love it and am considering using it for a large project I''m starting. If you''ve used it, I''d love to hear your comments! Jamie
2006 Apr 13
0
Model with file uploads
...def validate_on_create errors.add ''field_thumb'', ''Invalid thumb'' unless !self.field_thumb.read.empty? errors.add ''field_video'', ''Invalid video'' unless !self.field_video.read.empty? end def after_create self.tag_with self.all_tags # upload field_video and upload field_thumb end def after_update self.tag_with self.all_tags end def after_delete # delete video and thumb files end def tags # return formatted tags from tag_list end def thumb # return full thumb url end d...
2006 Feb 07
1
acts_as_taggable plugin: more delimiters?
I''m going through the Recipes book and got to the Tagging chapter, wanted to give it a shot. According to the text, tag_with takes a space-delimited list of tags. Is there a way to use different delimeters, such as commas or single quotes? Some tags can potentially have more than one word, such as ''ice cream''. I''d like to be able to use those without doing something funky like ice_cream or I...
2006 Feb 17
2
acts_as_versioned and acts_as_taggable on same model?
I am trying to use acts_as_versioned and acts_as_taggable (plugin) on the exact same model. Has anyone successfuly done this? I think what I need to do is make model_versions acts_as_taggable instead of my main model. Anyone have any other suggestions or any suggestions how to do this? Your Friend, John Kopanas http://www.kopanas.com
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 returned. Any help would be greatly appreciated! .Martin -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You...
2008 Dec 11
1
help needed regaring Acts As Taggable On Steroids
Hello, In my rails application, I have a book model. I want to add tags. For that I have installed acts_as_taggable_on_steroids from this link http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids and do as the readme file. This is my Model : class Book < ActiveRecord::Base acts_as_taggable end Here is my ApplicationHelper : module
2006 Jun 25
1
Having Trouble Using ActsAsTaggable
...d 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 up the console and did the following: Loading development environment. >> Tag.find_or_create_by_name("ruby rails", User.find(2)) NoMethodError: undefined method `find_or_create_by_name'' for Tag:Class...
2006 Feb 17
1
acts_as_taggable plugin and multi word tags
I decided to play with the plugin acts_as_taggable based on Chad Fowler''s book Rails Recipes. Is it just me or can tags only be one word? If not can you explain to me how to assign multi-word tags using the acts_as_taggable plugin. Thanks :-) John Kopanas http://www.kopanas.com ===================================================================== http://www.soen.info - source
2006 Feb 23
0
Sending parameters for filtering
...I have spit the form into two pages. The first page gets most of the information about the resource and stuff and I want it to send two parameters to the next page so I can "filter" out some of the standards. I have this: @resource = Resource.new(params[:resource]) @resource.tag_with(@params[:tags]) if @resource.save flash[:notice] = ''Resource was successfully created.'' redirect_to :action => ''new_continued'', :level => @params[:level], :subject => @params[:contentarea] But when I check my development log I see...