mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
parent
82f592a1ed
commit
24f757b130
3 changed files with 8 additions and 9 deletions
|
|
@ -3,8 +3,7 @@ require 'rails/generators/named_base'
|
|||
module AASM
|
||||
module Generators
|
||||
class AASMGenerator < Rails::Generators::NamedBase
|
||||
|
||||
source_root File.expand_path("../templates", __FILE__)
|
||||
namespace "aasm"
|
||||
argument :column_name, type: :string, default: 'aasm_state'
|
||||
|
||||
desc "Generates a model with the given NAME (if one does not exist) with aasm " <<
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ module ActiveRecord
|
|||
module Generators
|
||||
class AASMGenerator < ActiveRecord::Generators::Base
|
||||
include AASM::Generators::OrmHelpers
|
||||
|
||||
namespace "active_record:aasm"
|
||||
argument :column_name, type: :string, default: 'aasm_state'
|
||||
|
||||
source_root File.expand_path("../templates", __FILE__)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ module Mongoid
|
|||
module Generators
|
||||
class AASMGenerator < Rails::Generators::NamedBase
|
||||
include AASM::Generators::OrmHelpers
|
||||
|
||||
namespace "mongoid:aasm"
|
||||
argument :column_name, type: :string, default: 'aasm_state'
|
||||
|
||||
def generate_model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue