similar to: Stories with many tags, tags with many stories, has_and_belongs_to_many howto?

Displaying 20 results from an estimated 3000 matches similar to: "Stories with many tags, tags with many stories, has_and_belongs_to_many howto?"

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 Mar 24
2
Return all rows, split then show uniques
I''m returning some rows from a tags database that look like this: ID WORDS 1. apple banana pear 2. banana melon 3. apple peach lime What I want to do with that data is use the .split method to divide them into separate values in an array, then use the .uniq method to return a unique list of the words like so: apple, banana, pear, melon, peach, lime So in my controller I
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 =>
2009 Sep 29
5
NoMethodError in Stories#show
I''m a Rails newbie and am working my way through Simply Rails 2 by Patrick Lenz. Have run into a problem on page 207 of the book; this is the error I run into when I fire up my server and open up httpL//localhost:3000/ stories/new I have posted the error message and trace below. Thanks in advance for your help.
2006 Mar 08
2
Need some brainstorming help: acts_as_taggable_list?
I''m trying to figure out the best way to set this data model up. I''m still pretty new to Rails, but hopefully I could turn this into something useful to others as well. Here are the basics: User has_many items items are taggable (items habtm taggings, tags habtm taggings) I also want users to be able to order their tagged items. So if I''ve tagged 5 items as
2006 Sep 12
1
acts_as_taggable -- which one?
There appear to be three acts_as_taggable implementations and I''m looking for a recommendation on which to use. - Gem - DHH plugin - Dema mixin The Gem implementation appears to be obsolescent, from what I can read on the lists and Google search. I like that the DHH plugin uses polymorphic associations because there will be lots of different taggable items in my application; however,
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
2005 Oct 21
8
Wrong number of arguments (1 for 0) on routes.rb
Hi, I''m baffled by this error. I need a simple controller to send e-mails, so first I thought about just creating the controller manually (without using script/generate), since that didn''t seem to work, I created a dummy table in my DB and used the usual procedure to generate scaffold code. Then I modified the controller to have only two methods, send and compose: class
2006 Feb 11
5
acts_as_taggable : plugin vs gem
Googling for acts_as_taggable is a little confusing: gem, plugin?! What are the differences? Which one to choose? Where is the best doc? Alain
2005 Dec 27
10
ActiveRecord flexible columns
I would like to have a table with flexible columns. For example i have the following table customers: id name email The user should be able to save other columns to the database as well : me = Customer.find(10) me.name = ''me company'' me.email = ''me-RPlE4GnVVoJHoQZOM9yvow@public.gmane.org'' me.msn = ''me1234'' # custom columns me.birthdate =
2006 Jan 06
4
"Selecting" a calculated row / Using :select in the paginate method
Hi, I was trying to use the :select parameter to select a calculated row, but it appears that the parameter is not picked up by the paginate method. I want to add the following to the select statement: timediff(now(), created_on) as age So I tried: @story_pages, @stories = paginate :stories, {:per_page => 10, :include => ''user'', :select =>
2006 Feb 13
1
dynamically generating a controller and appropriate routing
I''m working on a library similar to acts_as_taggable. I''d like it to be a simple, one file drop-in: i.e., put my_library.rb into RAILSROOT/lib/ and have everything work. However, the library requires a controller to render some stuff, so I need to be able to create the controller class, set the routing, and extend the controller at run-time from within my_library.rb. I have code
2005 Sep 13
5
acts_as_taggable 1.0.4 now gemified!
Hi Folks, The acts_as_taggable mixin is now available as a shiny gem. More details here: http://dema.ruby.com.br/articles/2005/09/13/acts-as-taggable-gemified This release features some cool additions as well. Cheers Dema -- http://dema.ruby.com.br - Rails from a .NET perspective
2008 Dec 20
3
undefined method `stories_path'
Hi, I recieve error "undefined method `stories_path'' for #<ActionView::Base:0x995b4ac>" when going to the view via site.com/stories/new The model is setup correctly, I can retrieve data from the db fine. I think it might be related to the helper but I have no idea where to start. It seems to think its failing on the first line of the view, i belive on the
2010 Jun 17
7
Why do rails calls a method when I'm calling a property?
Well, I''m starting on RoR, so I got a Book called simply rails...Following the steps in it sometimes when I try to call a property, the browser shows me the next exception: undefined method `name'' for nil:NilClass I don''t know why...here''s my controller: #Controller starts here class StoriesController < ApplicationController before_filter :login_required,
2005 Dec 15
2
Rails Tagging Generator?
Hey all! Just finished my first Rails app on 1.0 day and even got paid for it! Great stuff and much thanks to the many generous souls in IRC, especially ezmobious, who helped me through. For my second Rails app, I want to use tagging. I am wondering if there is a Tagging Generator or some other existing implementation I can borrow from? Best, Mike Pence Boca Raton, FL
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:
2005 Dec 16
3
Using :include "recursively" (including the children of the child)?
Hi, Let''s say I have the following hierarchy of tables: Group <- parent Location <- child of Group School <- child of Location Phone <- child of School Then, if I want to do this: Location.find(...someparms..., :include => [:schools, :group, :phones]) I get an association error (Association was not found). I guess it happens because AR is looking in the Location model
2017 Oct 18
1
dygraphs, multiple graphs and shiny
Hi All: This is really getting into the weeds, but I am hoping someone will have a solution. I am trying to use dygrahs for R, within Shiny. The situation arises when I am combining a number of dygraphs into one plot. If I am just in an RNotebook, if you look at: https://stackoverflow.com/questions/30509866/for-loop-over-dygraph-does-not-work-in-r the solution to have the plot shown from a
2006 Feb 13
6
How can I access the value of params[:tags] in my validate function?
I would like to have tags mandatory in my app. The following keeps giving me error that params is nill. def validate() if (@params[:tags]) errors.add(@params[:tags], ":tags must be entered ") end end Why cannot I access params in my model class? The field for tags is called "tags" How else can I add an error using errors.add? I