Displaying 6 results from an estimated 6 matches for "taglist".
Did you mean:
tag_list
2005 Dec 23
6
Stories with many tags, tags with many stories, has_and_belongs_to_many howto?
..."story", I want to add several tags to it. Then, the
model should create those tags and link them to the respective stories,
and for the tags that already exists, just link them to the story.
I tried something like this (snippets):
class Tag < ActiveRecord::Base
def self.create(taglist)
tags = Array.new
count = 0
taglist.split(/,/).each do |tag|
tags[count] = Tag.new(:name => tag.chop.downcase)
count += count
end
end
end
class StoriesController < ApplicationController
def create
@tags = Tag.create(params[:ta...
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
2017 Oct 18
1
dygraphs, multiple graphs and shiny
...ackoverflow.com/questions/30509866/for-loop-over-dygraph-does-not-work-in-r
the solution to have the plot shown from a RNotebook is code like this:
> library(dygraphs)
> lungDeaths <- cbind(mdeaths, fdeaths)
> res <- lapply(1:2, function(i) dygraph(lungDeaths[, i]))
> htmltools::tagList(res)
and if you put that into an RNotebook and knit it, it works. Okay in order to have a reproducible example, I now try to create a Shiny App using that example, and the template generated by RStudio. To use dygraphs in Shiny, you replace the normal render and plot routines, such that the...
2006 Mar 08
2
Need some brainstorming help: acts_as_taggable_list?
...lationships. There are
some good ideas about HABTM lists:
http://wiki.rubyonrails.org/rails/pages/HowToUseActsAsListWithHasAndBelongsToMany
But easily getting that to only show messages for a particular user is not
straightforward. You could hack it a bit by adding another table/model that
was a TagList, with a user_id, tag_id, message_id, and position - but that
seems like a lot of data duplication.
That just got me thinking that maybe you can make the model for TagList, but
not have it be based on an actual table (make it a composite model). I seem
to remember reading about that - maybe I'...
2006 Mar 24
2
Return all rows, split then show uniques
...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 have:
def taglist
@tags = Tag.chop_em(params[:tag])
end
and in my model I know I need something:
def self.chopem(tag)
Tag.find(:all)
end
I think I lack the understanding of how the array that comes back from
the database is constructed. Can anyone explain this so I can chop those
words up and sort them with t...
2008 Dec 11
1
help needed regaring Acts As Taggable On Steroids
...hen I want to create a new book entry it
shows error as below:
"You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.empty?"
And the error details shows that the error is in tag_cloud
When I add a TagList.delimiter = " " in config/environment.rb
and restart the server.. the server stop with error showing as
uninitialized constant TagList .
Please help me as I am new in ruby.
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~---...