Create is the premier generator command. It copies files, creates
directories, renders templates, and more.
| Public Methods |
| class_collisions |
Check whether the given class names are already taken by Ruby or Rails. In
the future, expand to check other namespaces such as the rest of the
user’s app.
|
| complex_template |
|
| directory |
Create a directory including any missing parent directories. Always skips
directories which exist.
|
| file |
Copy a file from source to destination with collision checking.
|
| identical? |
Checks if the source and the destination file are identical. If passed a
block then the source file is a template that needs to first be evaluated
before being compared to the destination.
|
| migration_template |
When creating a migration, it knows to find the first available file in
db/migrate and use the migration.rb template.
|
| readme |
Display a README.
|
| route_resources |
|
| template |
Generate a file for a Rails application using an ERuby template. Looks up
and evaluates a template by name and writes the result.
|
<code/>and<pre/>for code samples.