-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paul Engel
committed
Nov 8, 2010
1 parent
f39eb22
commit 421eaa0
Showing
2 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
class EnrichmentsGenerator < Rails::Generators::Base | |||
|
|||
desc "Creates entities used by Enrichments (e9s)" | |||
class_option :user_model , :type => :string , :default => "User" , :aliases => "-u" , :desc => "The name of the Authlogic user model." | |||
class_option :content_model , :type => :string , :default => "CmsContent" , :aliases => "-c" , :desc => "The name of the CMS content model." | |||
class_option :translation_model, :type => :string , :default => "Translation", :aliases => "-t" , :desc => "The name of the I18n translation model." | |||
class_option :migrate , :type => :boolean, :default => false , :aliases => "-m" , :desc => "Run 'rake db:migrate' after generating model and migration" | |||
|
|||
def generate_rich_cms_files | |||
generate "rich:authlogic_user", options[:user_model] | |||
generate "rich:cms_content", options[:content_model] | |||
end | |||
|
|||
def generate_rich_i18n_files | |||
generate "rich:translation", options[:translation_model] | |||
end | |||
|
|||
def migrate | |||
rake "db:migrate" if options[:migrate] | |||
end | |||
|
|||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters