Displaying 12 results from an estimated 12 matches for "cat_id".
Did you mean:
cap_id
2006 Jan 15
4
form inputs resetting on sumbit
I searched for forum for something about this but couldn''t find
anything.
For example I have this in my view: (you enter start/end dates from
dropdowns, pick a category and a report is generated.)
<%= start_form_tag :action => ''display_report'' %>
From: <%= date_select ''report'', ''date1'' %> <br />
To: <%=
2006 Jul 04
1
Has_many :through with checkboxes?
...)
# account_controller.rb
@user = User.find(params[:id])
subscriptions = Subscription.find(:all, :conditions => "user_id =
@user")
subscriptions.each do |subscription|
subscription.destroy
end
categories = params[:cats]
categories.each {|cat|
subscription = Subscription.new(:cat_id=>cat, :user_id=>@user)
subscription.save
}
=end code
Does anyone know what''s going wrong here?
Very grateful for your help,
Jacob
-
Jacob Patton
2006 Jul 08
9
How to handle dynamically columned tables in rails
I want to build an application that lets me (the end user accessing a
web page) design a simple list with columns and add records. E.g., if
the end user says I want a table that has a list of songs, he can create
a list (title, date, artist, label) and then make another list of, e.g.,
books on his bookshelf with the necessary columns (title, author,
pub_date, shelf).
The end user
2006 Feb 19
0
creating a model that has other models as elements
...I want to create a model, Cookoff, that will contain arrays of
Dog, Cat and Recipie objects. There is no associated database table
for Cookoff because it''s merely a container for a specific request,
not an actual data item.
My users will submit a form with the following data:
dog_id: 10
cat_id: 12
A Cookoff instance will be created, with the following parameters:
- a Dog model object with data from the dogs table where id=dog_id
- a Cat model object with data from the cats table where id=cat_id
- a Recipe model object with data from the recipies table where the
recipie_text contains Do...
2005 Dec 19
2
Difficulty using correct moldel for the data in DB
...nother
items to create a higher level item. The higher level items can be
fused to create even higher level items ... etc.
I''m using MySQL to store the data. Here is how I have setup the database:
CREATE TABLE `items` (
`id` INTEGER(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) ,
`cat_id` INTEGER(11),
`rank` INTEGER ,
PRIMARY KEY(`id`)
);
CREATE TABLE `cats` (
`id` INTEGER(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255),
PRIMARY KEY(`id`)
);
CREATE TABLE `fusions` (
`id` INTEGER(11) NOT NULL AUTO_INCREMENT,
`item1_id` INTEGER(11),
`item2_id` INTEGER(11) ,
`product_id`...
2010 Jul 26
4
Changing the model_path.
Hi,
I''m new to RoR, but currently need to make some changes to my site to
implement permalinks.
Whenever I do a link, I use: category_path(category) and then the
to_param permalinks it. The previous piece of code would link you to /
categories/CategoryPermalink; the trouble is I don''t want it to be /
categories, I just want it to be /PERMALINK.
Then I''m getting into
2018 Oct 10
0
Microsoft joins OIN - I think Samba is covered !
...the software packages
identified below in Tables 1 and 2, as such packages’ currently-released
source code as of November 8, 2005 is identified on the OIN website"
and if we drill down further on tables 1&2
https://www.openinventionnetwork.com/joining-oin/linux-system/linux-system-table/?cat_id=3&type=table
I see: "850 samba"
Woo Hoo ! I think we're covered for all Samba releases from
2005 onwards !
This is *great* news for users/vendors/OEMs/support vendors
who might have been concerned about patent issues around SMB1/2/3 !
(Note this is not legal advice, just my...
2006 Apr 20
0
Please help me !
...able_items
@products_id = Product.find(params[:id])
@products = Product.salable_items1(params[:id])
flash[:notice] = "Succesfully"
end
I want to acess the varible that is in nthe product.rb file that is
model
def self.salable_items1(rid)
find(:all,
:conditions => "cat_id = rid",
:order => "date_available desc")
end
I am unable to access the variblein find method rid
How can access that variable..
Thnaks and regards,
Sure
--
Posted via http://www.ruby-forum.com/.
2005 Dec 18
0
Difficulty with creatating a model
...ther
items to create a higher level item. The higher level items can be
fused to create even higher level items ... etc.
I''m using MySQL to store the data. Here is how I have setup the database:
CREATE TABLE `items` (
`id` INTEGER(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) ,
`cat_id` INTEGER(11),
`rank` INTEGER ,
PRIMARY KEY(`id`)
);
CREATE TABLE `cats` (
`id` INTEGER(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255),
PRIMARY KEY(`id`)
);
CREATE TABLE `fusions` (
`id` INTEGER(11) NOT NULL AUTO_INCREMENT,
`item1_id` INTEGER(11),
`item2_id` INTEGER(11) ,
`pro...
2004 May 18
2
ADIT 600 Manual
I am trying to find a manual for the Carrier Access Adit 600. Does anyone
know where I might be able to find one?
Thanks
-Jon
--
Jon J. Brandon jon@monsoonretail.com http://www.monsoonretail.com
2006 Feb 22
15
Fixtures and Relationships
In my daily development, I migrate back and forth between versions, and
often do: rake load_fixtures...
... in order to populate my development database with fun data.
Now, with any HABTM relationship, there are failures, as there is no way to
say "which" fixtures to load first.
Within an actual functional or unit test case, you could simply load them in
the proper order, but
2007 Oct 04
12
Rails' abilities fitting?
Hi,
I''m looking at developing a reasonably complex web application, where
most of the complexity actually lays in the database and the queries
I need run on it. Some "classes" or models need to consist of an
assembly of several tables. It would be trivial enough for me to code
these queries in SQL, but as far as I understand Rails is trying to
hide the database as