Sha256: 6301e2f93eb44fb2acb0f2bc6f0f4f760183a7c5c7700394dae9dec6d9226c88

Contents?: true

Size: 648 Bytes

Versions: 42

Compression:

Stored size: 648 Bytes

Contents

require 'rails/generators/active_record'
require 'generators/helpers/orm_helpers'

module ActiveRecord
  module Generators
    class HttpUtilitiesGenerator < ActiveRecord::Generators::Base
      
      include HttpUtilities::Generators::OrmHelpers
      source_root File.expand_path("../templates", __FILE__)
      
      def copy_proxy_migration
        migration_template "migration.rb", "db/migrate/create_proxies" unless model_exists?('proxy') && behavior == :invoke
      end
      
      def copy_proxy_model
        template "proxy.rb", "app/models/proxy.rb" unless model_exists?('proxy') && behavior == :invoke
      end

    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
http_utilities-1.4.3 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.4.2 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.4.1 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.4.0 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.9 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.8 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.7 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.6 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.5 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.4 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.3 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.2 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.1 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.3.0 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.2.7 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.2.6.5 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.2.6.4 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.2.6.3 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.2.6.2 lib/generators/active_record/http_utilities_generator.rb
http_utilities-1.2.6.1 lib/generators/active_record/http_utilities_generator.rb