这是indexloc提供的服务,不要输入任何密码
Skip to content

jesusmarlima/schema_to_scaffold

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schema to Scaffold

Generate rails scaffold pages based on a rails database schema you already have.

Use your schema.rb file from <rails_app>/db or generated with rake db:schema:dump

SchemaToScaffold will generate rails scaffolding scripts by table like this:

rails g scaffold users fname:string lname:string bdate:date email:string encrypted_password:string

Installation

Assuming that you have rubygems-bundler installed, just type:

gem install schema_to_scaffold

Usage

Just type:

scaffold [options]

[options]
-h				Displays help.
-p <path>		It specifies a search path or a path to a file 
				ex: -p /user/path  or  /path/to/your/schema.rb
-c				Works only on linux. Will copy the script copied to your clipboard.
				You will need to have xclip installed(see below).

To install xclip

sudo apt-get install xclip

About

Enables "rails generate scaffold" to create Rails code that matches an existing database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%