Displaying 20 results from an estimated 400 matches similar to: "find_by_tag"
2006 Jul 22
2
fetching records from tables
Dear all,
I have a doubt,
How to fetch records from tables, which are not having ID field as its
primary key.
If possible, please tell me to way to extract data from those tables.
--
with regds,
Nahalingam N. Kanakavel.
(http://www.nahalingam.bravehost.com/PlanetN/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2005 May 23
1
has_and_belongs_to_many dual insert error ?
Hi !
(See references at the end)
I have a slight problem. Whenever I save one of my domain models, which
contains an has_and_belongs_to_many relationship with another one, the
relationships are doubled.
My domain is a series of pictures, where each picture can be tagged with
one or more words. So, a picture of my dog could be tagged "Jordy, Dog,
Dog 2005", for example.
In my
2006 Aug 03
6
create or update -
Hi everyone,
I''m looking for a shortcut to finding and updating or creating record
depending on the results of the find.
So, is there a shorter way to do it than this?
@stuff = Stuff.find_by_foo_and_bar("yay","hooray")
if @stuff: Stuff.update(@stuff.id, {:foo => "boo", :bar => "hoo"})
else Stuff.create({:foo => "boo",
2006 Aug 06
4
Can''t run rails
Yesterday, I was having a problem with db:migrate. I was told my version
of rails was too old, and I needed to install it from gems instead of
the version in my version of Ubuntu. Since then, I''ve done that, and I
built ruby 1.8.4 from source and installed it. The installation was to
/usr/local/bin. As my distribution had put ruby 1.8.3 in /usr/bin, I
renamed that and put a link to
2010 Aug 23
4
Segmentation Fault
Once more, with feeling.
I''m trying to implement using xrc_replace so as to use a RichTextCtrl in
a form created by FormBuilder. The problem is that I can''t even create a
RichTextCtrl. When I try to, I get a segmentation fault.
I''ve attached the files that are causing this. I''m running wxRuby on a
box running an up-to-date PCLinuxOS distro. I''ve
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 Aug 05
5
error with db:migrate
I''m new to ROR, and am working my way through the Agile Web Development
Book. In the test application, the authors tell me to test my database
connection by performing "rake db:migrate".
When I do, I get the error "Don''t know how to build task ''db:migrate''"
I''ve been looking around at the files, and I see a reference to a
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
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
2006 Apr 20
2
acts_as_taggable magic.... please explain
Hi,
There is a line in acts_as_taggable plugin:
send(acts_as_taggable_options[:from]).tags.find_or_create_by_name(name).on(self)
could someone explain what is:
send(xxx)
and
.on(self)
I cannot find it rDoc
--
Posted via http://www.ruby-forum.com/.
2006 Aug 09
2
Ruby 1.8.5 Warnings in Rails
I have ruby 1.8.5 installed. Everytime I enter a rails command, I get a
long stream of warnings telling me that the colon is being obsoleted,
that a semicolon should be used instead.
Does anyone know how to stop these warnings from coming up? They get in
the way of real messages from rails.
tia
---Michael
--
Posted via http://www.ruby-forum.com/.
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 Mar 29
3
tagtools vs acts_as_taggable
tagtools and acts_as_taggable are both folksonomy tools for rails,any
one who has used them both and can give a compare between them?
Grateful!
--
Posted via http://www.ruby-forum.com/.
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
2008 Apr 16
8
Will acts_as_taggable_on_steroids and better_nested_set work together?
I am having this crazy problem where it ONLY shows up in testing.
This is my test code
<code>
def test_should_destroy
task1 = Task.new(:description => "tmp",
:done => false,
:user => User.find_by_login(''admin''))
assert task1.save
assert task1.destroy
end
</code>
This is my task model
2006 Oct 06
3
params 101
This is incredibly basic, but...
I have a form that has fields defined for password and
password_confirmation. it is passing in the following data
Parameters: {"commit"=>"Change Password",
"admin"=>{"password_confirmation"=>"beagle", "password"=>"beagle"},
"id"=>"3"
I thought that
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 Mar 24
3
Using Tags in Applications
I''ve been contemplating the utilization of "tags" functionality for
categorizing records in my application. For example, a record can have
any tag associated with them: volunteer, donor, phone_caller, etc.
(Much like delicious)
Has anyone already laid out a good architecture for implementing this
on the DB, or other medium? I''m sure I can custom build something, but
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 %>
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 =