Displaying 12 results from an estimated 12 matches for "sub_category".
2008 Jan 20
0
Deserialize JSON post body
...u 53b2c:X -H "Content-Type: text/xml" -v -d
"<subscriber><full_name>Alex Egg</full_name><carrier_id>2</
carrier_id><mobile_phone>1234321843</mobile_phone><password>asdf</
password><sub_categories type=\"array\"><sub_category>1</
sub_category><sub_category>2</sub_category></sub_categories></
subscriber>" http://localhost:3000/subscribers/helper.xml
Rails deserialized xml xml into a subscriber hash:
Parameters: {"subscriber"=>{"carrier_id"=>"2",...
2006 Jun 16
1
sortable acts_as_tree with heirarchy
I''ve been stumbling on the tut at oriontransfer
(http://wiki.oriontransfer.co.nz/main/show/SortableTree)
I''ve got it working in a one dimensional list and I''ve got the drag and
drop working on children, but as can''t get it to save the tree.
Here''s my view:
<h2>Menu Prototype 2</h2>
<%= flash[:notice] %>
<ul
2011 Apr 21
0
Routing assertions
Hi
Thanks for help me out
I have two routes :
match ''admin/categories'' => ''admin#categories'', :as =>
''admin_category''
match ''admin/categories/:sub_category'' => ''admin#categories''
In rspec
------------------------------------------------------------------------------------------------------------------------------------------------------
For first route
assert_routing({:path => "admin/categories&qu...
2006 Jun 17
5
Having trouble listing tiers of categories
I have categories and sub-categories in a table called "categories".
Every row has a "parent" field to note if the entry is the sub-category
of another (never goes deeper than 1 level).
So there might be something like this:
id | name | parent
1 Dog 0
2 Pug 1
3 Siamese 5
4 Shih Tzu 1
5 Cat 0
6 Wiener Dog 1
7 Persian
2005 Dec 16
2
HOW DO I populate options from previous option click
Hi,
I have a form with three drop down option lists. Currently each of these
contain full listings as instantiated in the controller on entering
the edit action. What I would like to do is filter the second list based
on what the user selected on the first and the third filtered to reflect
the second.
For example I have major_role, role and person_in_role = role is a
subset of major_role
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 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 Apr 09
1
select helper question
Hi there, I try to develop a medical application using ruby on rails.
There are many categories which can contain subcategories.
I defined the model like this:
class Category < ActiveRecord::Base
has_and_belongs_to_many :notes
belongs_to :parent_category, :class_name=>"Category",
:foreign_key=>"category_id"
has_many :sub_categories,
2007 Feb 26
24
Ruby/rails port of Cocoon/hibernate
Hi,
I''m currently running an apache/jboss cocoon/flow/hibernate/ajax
paypal (directpayment) project and am looking into the possibility of
porting it across to ruby/rails. For that reason I would like to know
the following:
1. Can I call my java classes or would I be looking at a complete
rewrite in ruby?
2. How effective is ruby in terms of seperation of concerns regarding
design from
2005 Jul 25
2
acts_as_tree and traversing parent/child relationships
...hild 1 parent_id: 1
child = id: 3 name: child 2 parent_id: 2
My Model starts out as:
class Category < ActiveRecord::Base
acts_as_tree :order => "name"
belongs_to :catagory, :class_name => "Category", :foreign_key =>
"parent_id"
has_many :sub_category, :class_name => "Category", :foreign_key
=> "parent_id"
Which seems right
I know that acts_as_nested_set has the ability to traverse through
the structure but everything I hear says not to use it yet. My
question is more or less can I till use it''s method...
2010 Jun 04
6
Ajax fails in IE8
hi guys,
I am testing a new optional funtionality in my site with IE 8 after
success with Firefox 3.6.3, chrome and safari.
The new functionality basically sees a "sub category" drop down list
get generated in my form as soon as a "Category" value is selected
from the "Category" drop down list.
I have been using the standard rails api such as observe_field, and
2008 Apr 01
1
Navigation Problems
...y5
Sub-Category6
In the main content, I have the following links:
Sub-Category1 edit delete
Sub-Category2 edit delete
Sub-Category3 edit delete
Sub-Category4 edit delete
Sub-Category5 edit delete
Sub-Category6 edit delete
When I click the Sub_Category link in either the navigation bar or the
main content, I should be directed to another page where the
Sub-Category''s children will be shown. But instead I have these errors:
NoMethodError in SubCategory#read
undefined method `each'' for #<SubCategory:0x351c414>
<div...