Sha256: 41878d29cb34ddee59f1b1948124a9f1a078c2de43dbaf3c5e72ae343e4ddf95

Contents?: true

Size: 375 Bytes

Versions: 1

Compression:

Stored size: 375 Bytes

Contents

module ActiveApplication
  module Generators
    class CancanGenerator < Rails::Generators::Base
      argument :cancan_model, type: :string, default: "User"

      def self.source_root
        @source_root ||= File.join(File.dirname(__FILE__), "templates")
      end

      def setup_cancan
        template "ability.rb", "app/models/ability.rb"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_application-0.0.1 lib/generators/active_application/cancan/cancan_generator.rb