similar to: migration column options not in schema.rb?

Displaying 20 results from an estimated 4000 matches similar to: "migration column options not in schema.rb?"

2005 Dec 20
0
db/schema.rb and PostgreSQL sequences
Hello. I''m working the "proper way" with creating the initial db schema via migrations and db/schema.rb. However, I have a bit of a special need, and need to know if anyone knows the solution to this; I need a sequence that is common to several tables - a "data id" that gives a sort of unique object number to every row in every table. Some associated tables (a
2009 May 22
1
[PATCH server] fixed smart pool 'save' regression.
The recent refactoring didn't work properly for new smart pools, so I've cleaned jup the parameter handling for the various pool 'create' actions. Signed-off-by: Scott Seago <sseago at redhat.com> --- src/app/controllers/hardware_controller.rb | 5 +---- src/app/controllers/pool_controller.rb | 6 ++++-- src/app/controllers/resources_controller.rb | 6
2005 Nov 25
2
acts_as_list with 2 fields in the scope
Hi Railers, I''ve got a Categories table. I want it to act as a list within the scope of the parent_id AND the site_id. Categories table : id label site_id parent_id So, in my Category class, I have : acts_as_list :scope => ''site_id = #{site_id} AND parent_id = # {parent_id}'' The problem is that when I try to move_up a Category with a parent_id that is null,
2007 Apr 21
3
attachment_fu thumbnails
howdy! I had the problem that attachment_fu didn''t make a thumbnail, but everything else worked. I read this post http://www.ruby-forum.com/topic/104213 and added a parent_id column. now I get the following error when I trie to add a photo: undefined method `find_or_initialize_by_thumbnail_and_parent_id'' for Photo:Class my code is: class Photo < ActiveRecord::Base
2008 Mar 14
2
attachment_fu attributes in db
I''m using file_column for upload images. now,I want to use the plugin attachment_fu. I have seen that for use it, i must create the attributes like: class CreateMugshots < ActiveRecord::Migration def self.up create_table :mugshots do |t| t.column :parent_id, :integer t.column :content_type, :string t.column :filename, :string t.column :thumbnail,
2014 Nov 24
3
[PATCH] v2v: -i ova: Remove incorrect warning for disks that have no parent controller (RHBZ#1167302).
Don't assume every disk <Item> has a <Parent> field. For floppy disks this is not the case. Thanks: Junqin Zhou --- v2v/input_ova.ml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml index 95af2e5..9a9c10a 100644 --- a/v2v/input_ova.ml +++ b/v2v/input_ova.ml @@ -187,14 +187,17 @@ object for i = 0 to
2006 Jun 19
3
Using set_primary_key breaks acts_as_tree with non-integer column
I just switched from using the standard "id" column into using my own primary key and generating my own unique id for each record. But, this breaks acts_as_tree. Because my new primary key is not an integer, it breaks the SQL query as follows: StatementInvalid in PagesController#create --------------------------------------------------------------------------------------
2006 May 07
3
Stupid newbie question
Here''s a request string which has a value I want to pull out from the category array - parent_id. Parameters: {"category"=>{"name"=>"Condiments", "parent_id"=>"1"}, "commit"=>"Create"} How do I reference that subelement in the receiving script? I''ve tried params[:parent_id]
2006 Apr 30
4
acts_as_ordered_tree
I need an ordered (sortable tree) and I just was thinking if somehting like this is possible: class Item< ActiveRecord::Base acts_as_tree :order => "position" acts_as_list :scope => ''parent_id = #{self.id}'' end For my understanding mixing of two acts_as should be p?ssible, at least in this case, right? Unfortunatly the :scope is not working, I am not
2005 Dec 15
4
Acts_as_tree and routing
I''ve got an acts_as_tree structure which I want to be able to represent in the URL, with one field identified as the url component. In other words, if I''ve got this: def self.up create_table :nodes do |t| t.column :parent_id, :integer t.column :tag, :string end end and class Node < ActiveRecord::Base acts_as_tree end and what I want the urls to be is something
2005 Sep 23
6
problem with acts_as_tree
Hi, I''m using the latest gem version of rails under MacOS Tiger. I was trying to use acts_as_tree as described in the rails book. So I have something like: class Category < ActiveRecord::Base acts_as_tree :order => "title" end create table categories ( id int not null auto_increment, title
2005 Jul 25
2
acts_as_tree and traversing parent/child relationships
I am working on an Rails application that uses a pretty complex category structure through out the site. I have defined a table to house all the info and a FK to reference parents within the table CREATE TABLE categories ( id int(11) NOT NULL auto_increment, name varchar(50) NOT NULL, parent_id int(11) default NULL, constraint fk_category_id foreign key (category_id) references
2009 Feb 19
3
Associated child records not created on creation of a parent.
I am trying to create a record with association. Within the create method, I would also like to pre-populate dependent (has_many) records from a template in the database. The child records are <u>mysteriously rolled back </u> if I insert them in a loop. If I try to insert a single child record, it works.I have read the books and tried to google my way out of this but am at a dead
2007 Jan 17
2
rake test and validates_inclusion_of
Hello, I am just starting off with Rails, so I apologize in advance if there is a terribly obvious answer to my problem. I''ve done some searching and found similar problems to my own, but nothing which yielded a solution. I have a handful of models that I am unit testing. The tests for each unit run successfully, but when I do a rake test, many of the tests fail. The assertions that
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
2009 Feb 20
1
better nested set and parent_id
Hello everybody I have a model with better_nested_set. In my "new" form, i pass the desired parent_id as a hidden field, and in the create action at the controller i save the new register and use move_to_child_of Model (params[item][parent_id]) Everything works, but at my log file it warns that i can''t mass asign the property "parent_id". What can i do to avoid the
2006 Feb 08
1
Many-To-Many w/acts_as_tree?
Guys, I''m having a problem getting acts_as_tree working. It seems from the Agile book (p. 255) that acts_as_tree only supports one-to-one record relations, whereas I need many-to-many support. In other words, looking at the picture at the top of page 256 where where only 1 id is linked to 1 parent_id, I need multiple id''s linked to multiple parent_id''s - for
2006 Jan 09
1
Saving an upload
I am creating a database for movies (films) and television shows (shows) that will have has_and_belongs_to_many relationships with the pictures table. CREATE TABLE screenshots ( id serial NOT NULL, filename character varying NOT NULL, content_type character varying NOT NULL, primary key (id) ); CREATE TABLE films ( id serial NOT NULL, name character varying NOT NULL,
2006 Apr 07
6
validation nightmare
Please help, I am really at a loss at how validation is supposed to work in rails. Model contains acts_as_tree I want to force my NEW objects to have a parent I do NOT want existing object to have a parent so I only want to have parent_id on create, NOT on update. I am trying this: def validate_on_create validates_presence_of :parent_id, :message => "You must specify a
2006 Feb 27
1
How to build a recursive parenting structure?
I''m just getting used to using HABTM structures. Something I''m trying to do now is create a site that has "sections" each section then could have a sub "section". So I built a "sections" table and in the model I included the line "has_and_belongs_to_many :sections" I also made a table called "sections_sections" to build the