Sha256: 5dbc1342ff506341a3ab14e1c99f0cef41180fb6092173ea8f42f1b7ef35bf89

Contents?: true

Size: 495 Bytes

Versions: 9

Compression:

Stored size: 495 Bytes

Contents

module Ixtlan
  class ControllerGenerator < Rails::Generators::NamedBase

    source_root File.expand_path('../../templates', __FILE__)
      
    argument :actions, :type => :array, :default => [], :banner => "action action"
      
    check_class_collision :suffix => "Guard"
    
    def create_guard_file
      template 'guard.rb', File.join('app', 'guards', class_path, "#{file_name}_guard.rb")
    end

    def guard_class_name
      class_name
    end

    def aliases
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ixtlan-guard-0.9.0 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.8.3 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.8.2 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.8.1 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.8.0 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.7.2 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.7.0 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.6.1 lib/generators/guard/controller/controller_generator.rb~
ixtlan-guard-0.1.0 lib/generators/ixtlan/controller/controller_generator.rb