Displaying 20 results from an estimated 30000 matches similar to: "oracle scaffolding"
2006 Jun 06
0
Re: [ocruby] iteration A1 in ebook: scaffold gets: routing error
At 02:42 AM 6/6/2006, you wrote:
>hi, on page 82 of second edition, getting stuck after
got past that, must have been doing something wrong. ended up writing
the script below:
thanks
set -x
base=i:/work
PATH=/cygdrive/$base:$PATH
name=depot
cd $base
rm -rf depot
ls
mysqladmin -f -u root drop ${name}_development
mysqladmin -u root create ${name}_development
mysqladmin -f -u root drop
2008 May 21
2
Scaffolding and ActiveRecord in Rails 2
Hi,
Is is possible to add this constraint: "null => false" and "limit => 45"
like below:
create_table :movie do |t|
t.string :name, :null => false, :limit => 45
end
...just by using this kind of scaffold command (on Rails 2)?
$ ruby script/generate scaffold Movie name:string
Thanks,
D.
--
Posted via http://www.ruby-forum.com/.
2006 Aug 17
0
super-newb needs help with has_many and other things...
I am brand new to oop and am having a difficult time getting my head
around some ruby stuff. In specific, I am trying to create a library
style app that lists topics, articles and comments. I have a table
called topics, a table called articles and a table called comments. My
models, controller and view are all listed below. What I want to happen
is to have the list view list each topic along
2009 Jul 04
3
scaffolding
hi , i used the folllwing command to scaffold,
G:\my\webblog>ruby script/generate scaffold webblog id:integer
title:string body
:text created_at:datetime
after when i migrate with the follwing command
rake db:migrate
i got the error as
(in G:/my/webblog)
== 1 CreateWebblogs: migrating
================================================
-- create_table(:webblogs)
rake aborted!
Mysql::Error:
2009 Oct 24
1
Inheritance Problem
Hello.
I have a question to inheritance in Rails(2.3.4).
I have this three models.
class Vehicle < ActiveRecord::Base
end
class Car < Vehicle
end
class RallyCar < Car
end
And this Migration:
class CreateVehicles < ActiveRecord::Migration
def self.up
create_table :vehicles do |t|
t.string :name
t.string :brand
t.string :type
t.timestamps
end
2006 Feb 15
2
migrations still
I think I am pissing into the wind to make migrations work at this
point.
Looking at
http://wiki.rubyonrails.org/rails/pages/UnderstandingMigrations
it appears that the problem that I am having is that postgresql can''t do
the drop_table part because of the foreign_key keys (constraints) which
requires ''cascade'' as an option to drop some of the tables that have
other
2006 Mar 31
2
A.R. Associations problem
Hello,
I''m learning A.R Associations by creating a simple forum that consists
of 3 tables: ahuthors, topics and posts. This is the schema:
class AddAuthorAndTopicAndPostTables < ActiveRecord::Migration
def self.up
create_table :authors do |t|
t.column :username, :string
t.column :email, :string
t.column :created_on, :datetime
end
create_table
2009 Nov 04
0
The error occurred while evaluating nil.prefetch_primary_key
The error occurred while evaluating nil.prefetch_primary_key?
Hi,
I have a problem with a model when I have 3 belongs_to relations in one
the middle.
This example is a subset of a grid-routing project:
n 1
1 n +------------ Project
Connection ------- ConnectionCost
+------------ WaySearchRun
2008 Jun 10
1
NameError in AdminController, uninitialized constant
Hi there basically following the "Agile Web Development With Rails, 2nd
Edition"
i followed the tutorial exaclty, worked fine, so i decided to change one
thing
on page 74 instead of:
ruby script/generate model product
i used:
ruby script/generate model propertys
and:
depot_a/db/migrate/001_create_products.rb
~/Rails/ecom/db/migrate$ cat 001_create_propertys.rb
class
2008 Jan 14
1
How do I add autoincrement?
Hello,
I am attempting to learn Ruby on Rails. I''m using Instant Rails
2.0 on a Windows computer. I really want the id number to
autoincrement, but I am not sure how to do that. The script that''s
generated after the scaffold is listed below. Any help is appreciated.
class CreateMenuitems < ActiveRecord::Migration
def self.up
create_table :menuitems do |t|
2006 Jun 13
11
Question: Migration - multiple creates
I want to create a migration file that creates multiple tables, so i''m
guessing the correct format would be:
Can anyone confirm ? I''m guessing that each new create script requires a
seperate class so formatted this way. Perhaps I''m wrong.
TIA
Stuart
class CreateTable1 < ActiveRecord::Migration
def self.up
create_table :table1s do |t|
t.column :length,
2010 Jul 04
3
Generated By handling CRUD Scaffold
Good afternoon.
I have two questions:
First question:
Can be defined at the time that I''m generating the scaffold the size
of
a string?
For example name:string (50)?
Second question:
I wonder how to proceed correctly to include new
fields starting at a CRUD generated by scaffold.
Example:
First step (I use):
script/generate scaffold User name:string login:string
Second step (I add
2006 Apr 07
0
Dynamic Scaffolding vs. ScaffoldGenerator
I asked this question before, but didn''t get any response. I hope
someone can give me some clue now.
Here''s the background, I upgraded to rails 1.1 and suddenly I was
getting strange failures in my functional tests. I traced the problem
to dynamic scaffolding. I had overwritten all of scaffold''s methods
in my controller (all but show and destroy). Destroy no
2010 Feb 23
2
Problem: The command "rake db:create:all" crashes
Hi All,
I''m running:
Rails 2.3.5
MySQL 5.1.44
WindowsXP-Pro/SP3
Following Noel Rappin''s book, Pro RoR, I successfully got past the
point of creating my first scaffold:
ruby script/generate scaffold supplier nickname:string qbname:string
That produced the migration, 20100221011210_create_suppliers.rb:
class CreateSuppliers < ActiveRecord::Migration
def self.up
2008 Apr 23
2
Table Unknown - SCHEMA_INFO
Hi all,
Sorry for another newbie question!
I''ve got a legacy firebird database which I wish to use, and thanks to
help from this group I''ve used Dr Nic''s Magic Models to get RoR
talking to the database.
However, I wish to create a new table ("reports") in this database,
and so generated the scaffold such that the file "db/migrate/
2006 May 17
0
acts_as_versioned with lock_version bug?
Hello.
The acts_as_versioned plugin works fine ... till the adjunction
of optimistic locking via the lock_version table column.
Here is the problem description:
Without optimistic locking things are fine:
# ++++ The table creation migration ++++
% cat db/migrate/001_create_tables.rb
class CreateTables < ActiveRecord::Migration
def self.up
create_table :softwares,
2006 Dec 27
0
HABTM Checkboxes - Adding/Updating Users to a Project
Hello all,
I''m trying to create a HABTM checkbox action that adds/updates ''users''
to a ''project''.
I have the following laid out.
---------------------
TABLES
---------------------
create_table "assignments", :id => false, :force => true do |t|
t.column "project_id", :integer, :default => 0, :null => false
2006 Jun 21
1
Migration with foreign key won''t work
Hi all
I use the plugin which supports foreign keys with migrations:
http://wiki.rubyonrails.org/rails/pages/Foreign+Key+Schema+Dumper+Plugin/versions/12
I have created the following migration file:
class AddArtistsTable < ActiveRecord::Migration
def self.up
create_table :artists, :force => true do |t|
t.column :name, :string, :limit => 100
t.column :artist_type_id,
2006 Sep 06
1
Changing Scaffold
Hi,
I am starting a project in rails and I wish to change scaffolding.
I''ve already done some changes like prepare all texts for locale. Now
I am wishing to change the way it generates the _form partial. Could
someone give some guideline so I can study such thing?
I saw "template_for_inclusion" in form.rhtml but couldn''t find out
how to change it.
Being more
2006 Feb 13
0
using Scaffolding Extensions plugin
After I downloaded this plugin, I am not sure how to use it. According
the doc:
Generally, the scaffolding extensions are used in same way as the normal
scaffolding. Inside a controller, run the command:
scaffold :album
But I tried to run scaffold :control_name, (I have table in the
database) in the app/controller, the system says " scaffold: command not
found"
Suggestion? Thanks in