lib/generators/adminpanel/resource/resource_generator.rb in adminpanel-1.2.4 vs lib/generators/adminpanel/resource/resource_generator.rb in adminpanel-1.2.5
- old
+ new
@@ -3,10 +3,10 @@
module Adminpanel
module Generators
class ResourceGenerator < Rails::Generators::Base
source_root File.expand_path("../templates", __FILE__)
- argument :resource_name, :type => :string
+ argument :resource_name, :type => :string, :required => true
argument :fields, :type => :array, :default => "name:string"
desc "Generate the resource files necessary to use a model"
def self.next_migration_number(path)
Time.now.utc.strftime("%Y%m%d%H%M%S")