Displaying 20 results from an estimated 2000 matches similar to: "Parent listing children."
2008 Apr 01
1
Navigation Problems
Hi,
I am having problems with my page. I have a banner and navigation bar in
controller_name.rhtml in app/views/layout. Can someone please help?
Thanks
In the navigation bar, I have the following links:
Category1
Sub-Category1
Sub-Category2
Sub-Category3
Sub-Category4
Sub-Category5
Sub-Category6
In the main content, I have the following links:
Sub-Category1 edit delete
2010 May 25
2
Site Navigation With Polymorphic Has Many Through
Hi, seem to keep running into a wall here. I can''t find any resources on
site navigation that can deal with any model being in the nav, allow
nesting, and can dynamically update.
So I thought about it for a while, and decided on a MenuItems class, which
contained the position of the child in relation to it''s siblings, where the
parent and the child were polymorphic. Then a given
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
2002 Dec 23
1
Strange axis labels?
Moi!
I'm trying to add a rather long label to a y-axis, and it's so long that
it won't fit into one line. However, things get strange when I try and
split it over 2 lines. The problem seems to be the plus/minus symbol,
which means I have to use expression(). I'm using R1.6.1 on Windoze
2000.
As an example:
thing1 <- expression(paste("log odds of survival probability (
2009 Aug 06
1
Using 'field names' of a data.frame in a function
I may be doing this wrong! but I have a function which I have simplified a lot below. I want to pass some 'field names' of a data-frame to the function for it to then do some manipulation of.
Here's my code:
#build a simple dataset
mydataset = data.frame (
2006 Feb 16
1
HABTM -VS- belongs_to/has_many, for self-referential joins
Ok, David says on page 241 that sometimes a many-to-many relation with
attributes are better implemented as an actual model instead of using HABTM.
Well, I''ve got that situation and I can''t figure it out.
All of the examples in the book have HABTM examples between 2 different
tables, but I want to have a HABTM relation on 1 table with itself. (e.g.,
if I have a table Things,
2006 May 25
5
Is there a way to abstract the updating of other parts of the page after an Ajax request without putting using the standard view file?
Hey all,
I''d like to abstract the process of updating different portions of the
page after an Ajax request has taken place. Rather than simply putting
the extra view logic in the standard rjs template, it seems to give
better separation if there is a split between the core view logic (ie,
inserting a row in a table), and updating any associated portions of
the page.
Is this possible? I
2006 Jan 06
2
Re: Some advice on DB modeling
I have more or less the same problem. I''m trying to build a system where
users can enter their friends. But the solutions seems not to work for me.
I used same sql:
CREATE TABLE `friends` (
`user_id` int(11) NOT NULL default ''0'',
`friend_id` int(11) NOT NULL default ''0'',
KEY `user_id` (`user_id`),
KEY `friend_id` (`friend_id`),
2009 Jul 17
2
Count data categories from table
Hi there,
I have a relatively simple question, though, I couldn't find a solution for
it so far. I have a table with 1000 entries and columns containing
information about different parameters for each entry.
What I want to do is group all parameters from one of the columns [e.g. if
all 1000 entries are grouped in 30 different categories (described as
character strings) in a second column] and
2006 Jan 30
4
Warning message when returning multiple items
In my function I am trying to return multiple computed items (separated by commas). The function does what I need, but I get a warning message that multi-argument returns are deprecated. Is this a warning I should heed, or is there a more elegant and warning free way of achieving the same end? Thanks
---------------------------------
[[alternative HTML version deleted]]
2007 Nov 12
15
If form changed ask if you really want to exit page...
First things first: Hi all! I''ve been sucked into prototype and
script.aculo.us develpment thanks (because of?) the Symfony PHP
framework...
I''d like to implement a feature on some admin pages, but I can''t seem
to find the right search term to google it; I want to ask the user to
confirm exit of a page, if she has changed anything on the forms
displayed on it.
I have
2008 Dec 27
1
Want to create empty vectors inside a empty data frame
Hi All,
I want to create empty vectors inside an empty data frame.The name of the
vectors has to come dynamically.
For example if record_mean is my empty data frame,and i have say 4
categories,the category names for record mean data frame has to
recmeanC1,recmeanC2,recmeanC3,recmeanC4,which will be dynamically created
and which will again be inserted in my data frame's as column values.Each
2008 Nov 14
3
migration with data
Hi
I am using postgres and have two migration files like
001_create_categories.rb as
class CreateCategories < ActiveRecord::Migration
def self.up
create_table :categories do |t|
t.column :name, :string, :limit=>80
end
end
def self.down
drop_table :categories
end
end
and 002_populate_categories.rb
class PopulateCategories < ActiveRecord::Migration
2015 Mar 31
2
emailing plain text to exchange/outlook
I know this isn't CentOS-specific, but it is probably a common problem
- does anyone have a solution?
If you mail something that is plain text from linux a recipient using
outlook, it will remove line breaks more or less randomly. There is
a way to tell outook to put them back as you read each message, but
most people just think I sent it wrong.
Is there something you can do to make a
2006 Mar 30
5
Heeelp - no idea what''s going wrong.
I''m working on a simple CMS. The main data type are "listings" a listing
habtm (has_and_belongs_to_many) categories and subcategories.
Subcategories belong_to categories. Subcategories are basically the same
as categories, but they are treated differently in a few situations.
The problem is, I can''t seem to write the view/controller/model code
that allows me to
2006 Apr 15
8
Inheritance in Rails - I need some help
I''ve got a model, "category" and another model "subcategory." Each
subcategory belongs_to a category, and a category has_many
subcategories.
What I need to do is set it up so that I can search Category and
Subcategory with one .find call. So:
Category.find(:all, <etc)
will find categories and subcategories.
Now, I believe this can be done by making
2009 Oct 15
10
AJAX - how to have multiple select form sets implemented?
hi, there :)
Consider a blogging application whereby a user is trying to add a new
blog.
He/she has to select a category. Upon selecting a category from a drop
down box, a new sub categories drop down box will be created (hence an
AJAX call). Got this implemented and it''s ok.
Now, let''s assume that a given blog can have multiple categories (and
subcategories).
For example, a
2006 May 23
7
has_and_belongs_to_many question
Hello,
I am trying to make the "switchover" to programming my apps in Rails and
have a question about database structure.
In the past i would structure a many to many like this:
categories
----------------------------------------------------
| id | name |
----------------------------------------------------
1 Some Category
2 Another
2006 May 12
2
Has many through join table issues
I''m trying to wrap my caffeine soaked brain around has_many :through
following along at:
http://rails.techno-weenie.net/tip/2005/12/23/teaching_your_blog_model_new_tricks_with_has_many_through
I think my models are a little more complex than what fits this
narrative.
I have a directory of members, each member can belong to multiple
categories.
The category table references itself
2007 May 02
3
acts_as_tree related question
hi,
I''ve a normal Category model implemented with acts_as_tree (name,
parent_id) that has_many :products (name, category_id).
What I''m asking for is a method to fetch every product that belongs
fall into a particular category and its children, eg: if I''m asking
for a root node (/category/show/1) I need to display every product
that have category_id = 1 AND every product