Skip to content

Commit

Permalink
updated generator flags are now --without-user & --without-page
Browse files Browse the repository at this point in the history
  • Loading branch information
twoism committed Dec 11, 2009
1 parent a1ee773 commit d578e9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ A drop in Rails CMS
*This is still being developed and is currently barely useable*


@$ script/generate kitsune --include-page-model
@$ script/generate kitsune --include-page-model@

$ rake db:migrate
@$ rake db:migrate@

$ script/server@
@$ script/server@


Then go to:
Expand Down
8 changes: 4 additions & 4 deletions generators/kitsune/kitsune_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ class KitsuneGenerator < Rails::Generator::Base

def initialize(runtime_args, runtime_options = {})
@versioned = runtime_args.delete("--versioned")
@include_pages = runtime_args.delete("--include-page-model")
@include_users = runtime_args.delete("--include-user-model")
@dont_include_pages = runtime_args.delete("--without-page")
@dont_include_users = runtime_args.delete("--without-user")
super
end

def manifest
record do |m|
if !!@include_pages
unless !!@dont_include_pages
page_model = "app/models/page.rb"
if File.exists?(page_model)
m.insert_into page_model, "include Kitsune::Page"
Expand All @@ -21,7 +21,7 @@ def manifest
end
end

if !!@include_users
unless !!@dont_include_users
m.migration_template "migrations/create_kitsune_users.rb", 'db/migrate', :migration_file_name => "kitsune_create_kitsune_users"
end

Expand Down

0 comments on commit d578e9c

Please sign in to comment.