Displaying 20 results from an estimated 193 matches for "topic_ids".
Did you mean:
topic_id
2006 May 28
3
Working with topics and categories
Hello guys,
I''m a newbie in RoR and I have a problem. My DB structure is
======================================
topics table : id(int,11)
name(varchar,255)
categories : id (int,11)
topic_id(varchar,255)
name(varchar,255)
======================================
--Models:--
class Topic < ActiveRecord::Base
has_many :categories
end
class
2005 Jan 21
2
collection_select
I''m trying to use collection_select, but it''s not working as I expect. The
list populates correctly but the current value is not selected.
@question contains a topic (via topic_id), and @topics is the list of all
topics. Here''s my attempt to create a drop-down list of the topics.
form("question") do | form |
form << content_tag("b",
2005 Dec 17
3
Can scaffold generate listboxes in views? I''ve been unsuccessful.
I''ve created several different Rails applications but I''m running
into the same trouble with each one. Lets say I create an app called
Test. I type ''rails test'' and it generates the directory for me.
Now I edit my database.yml file. Then I create a database with
Postgresql by typing createdb test. Now I go into Postgresql by
typing ''psql
2007 Jan 31
2
has_many :conditions
Is it possible to put conditions relative to the current instance in
has_many''s :conditions?
For example, in a forum app:
class Post < ActiveRecord::Base
belongs_to :topic
has_many :self_and_descendants, :class_name => "Post", :order =>
"lft",
:conditions => "topic_id = #{topic_id} AND (lft BETWEEN #{lft} AND
#{rgt})"
end
With the
2009 May 11
7
Contribute request
Hello!
I was advised by the forum moderator to ask for contribution:
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=20223&forum=38&post_id=76546#forumpost76546
My wiki login is VladislavRastrusny
I would like to contribute for Tips & Tricks section with a small
automated script to install webmin repository data and webmin itself
from here:
2006 Nov 28
17
Index not being updated
My index is not being updated when I add new records or amend existing
ones.
Can anyone point me in the direction of where I should be looking for
what is going wrong?
I''m running this in the production environment.
--
Posted via http://www.ruby-forum.com/.
2006 May 07
1
Find records not in join with has_many_and_belongs_to
I have a User and Topic model. A user subscribes to a topic, so there is a
many-to-many relationship between User and Topic. So my User model object
is using has_many_and_belongs_to :topics and vice versa. I want to find all
the topics that a user has *not* subscribed to. This is what I''ve got:
@user = User.find(params[:id])
@topics = Topic.find(:all,
:conditions =>
2006 May 30
2
acts_as_tree, acts_as_list and is invincible (help!)
So I have the following model
class Topic < ActiveRecord::Base
belongs_to :topic
has_many :topics, :order => :position
acts_as_tree :order => :position
acts_as_list :scope => :topic_id
end
that I use for a site''s navigation. Everything (list, create, edit, even
the drag&drop sort) works fine, except the destroy function, which the
vanilla version
def destroy
2006 Aug 25
3
RJS Error: Element.update is not a function
Hi,
I have implemented some RJS code and I have the same exact code in 2
different places. In one place I get the error "Element.update is not
a function" and the other place works fine. Any idea why this error is
coming? Breaking my head.
-Vinod
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
2011 Aug 11
17
f.collection_select: what are the parameters?
The rails docs are so horrible on the collection_select method. They
need to show a *complete* form, and show two examples: one that calls
f.collection_select(), and another that calls collection_select(), and
explain the differences.
Given this line:
f.collection_select :topic, Topic.all, :id, :category
What the !@#$!@#$ is :topic?
--
Posted via http://www.ruby-forum.com/.
--
You received
2009 May 08
3
Potential loss of a wiki contributor.
Ralph,
Will you please check posts #17, 18 & 19 of this forum thread --
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=19968&start=0#forumpost76277
When you have a moment, I'm sure you will reply to it. :-)
Alan.
2005 Aug 08
3
Caching nameserver
I am having some issue with setting up a caching nameserver.
here's the link:
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=150&forum=10&post_id=400#forumpost400
the OS is now CentOS4
--
My "Foundation" verse:
Isa 54:17 No weapon that is formed against thee shall prosper; and
every tongue that shall rise against thee in judgment thou shalt
condemn. This is
2008 Aug 13
2
Help setting up external drive via Firewire
I got a WD 1TB My Book with eSATA/USB/Firewire400 connectivity to backup
data on a client Centos 5.1 machine.
USB 2.0 works fine out of the box but is rather slow, Nautilus predicts
about 1+ hour to fully backup just one day's worth of data or about 100GB.
So I was hoping Firewire would be faster, which is why we got the version
with all 3 interfaces to experiment with first.
Following the
2009 Mar 08
2
RESTful nested resources and polymorphism?
With ref to my previous post: http://www.ruby-forum.com/topic/180356
I am now able to access items from topics controller. However, now I
need to add sub-item e.g.: An item itself could have many sub-items. So
my items model is like:
class Item < ActiveRecord::Base
validates_uniqueness_of :title, :scope => [:topic_id]
validates_presence_of :topic_id, :title, :owner, :position
2006 Feb 18
14
Composite primary key support in ActiveRecord?
Hi,
As I understand, composite primary keys aren''t supported in
ActiveRecord yet. May I ask if there are plans for this feature?
Better yet, if this feature is under development, how''s the progress
going?
I''m not trying to use legacy databases. I tend to think that using
multiple integer column id''s (composite primary key) are often
natural way to
2006 Jan 22
11
ActiveRecord find
Suppose I have three tables - authors, posts and topics.
Every post have a topic and every topic has an author, so I have
posts.topic_id and topic.author_id. When the author is guest (not
registered), author_id is nil.
I need to find all the posts (in one query) where every post have all
the information of the topic and the auther, so if p is one of those
posts I could get the name of the
2009 May 14
2
Possible SAN Issue
Just a quick ping to the general m/l.
Is there a SAN expert out there who could spare some time to have a
look at this forum post, please?
URL -- http://www.centos.org/modules/newbb/viewtopic.php?topic_id=20273&forum=39
Alan.
2011 Apr 17
2
Heads up: Bugged update xorg-x11-server-utils-7.1-5.el5_6.1 upcoming
Hi,
Reading
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=30939&forum=37 I noticed a warning about an upcoming bugged update xorg-x11-server-utils-7.1-5.el5_6.1
I would advise everyone to add
exclude=xorg-x11-server-utils-7.1-5.el5_6.1
to their updates repo config.
Regards,
Leonard.
--
mount -t life -o ro /dev/dna /genetic/research
2006 Nov 22
0
Returning objects (not ids) in grouped count
I am trying to do a filtered, grouped count and have the grouping
returned be an object, not an object id.
Consider a blogging application. I want to return a list of topics with
their posting counts, filtered by a user id.
This:
Topic.count :conditions => ["user_id = ?", 1], :joins => "INNER JOIN
postings ON topics.id = postings.topic_id", :group =>
2009 Oct 15
2
Model.Save causing nil object error
Hello all.
Newbie to rails here and I am having a bit of an issue. I have the
following models:
class Topic < ActiveRecord::Base
validates_presence_of :name
validates_length_of :name, :minimum => 3
has_many :relationship_topics
has_many :relationships, :through => :relationship_topics
end
class Relationship < ActiveRecord::Base
has_many :relationship_topics
has_many