Sha256: a280f5a9ca250264707ba6f56c815b4d902f743613956cac2cfe95409b20b00b

Contents?: true

Size: 403 Bytes

Versions: 188

Compression:

Stored size: 403 Bytes

Contents

# encoding: utf-8
require "rails/generators/mongoid_generator"

module Mongoid #:nodoc:
  module Generators #:nodoc:
    class ObserverGenerator < Base #:nodoc:

      check_class_collision :suffix => "Observer"

      def create_observer_file
        template 'observer.rb.tt', File.join('app/models', class_path, "#{file_name}_observer.rb")
      end

      hook_for :test_framework
    end
  end
end

Version data entries

188 entries across 96 versions & 4 rubygems

Version Path
classiccms-0.6.4 vendor/bundle/gems/mongoid-2.4.9/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.4 vendor/bundle/gems/mongoid-2.4.10/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.4 vendor/bundle/gems/mongoid-2.4.7/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.3 vendor/bundle/gems/mongoid-2.4.9/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.3 vendor/bundle/gems/mongoid-2.4.10/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.3 vendor/bundle/gems/mongoid-2.4.7/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.2 vendor/bundle/gems/mongoid-2.4.10/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.2 vendor/bundle/gems/mongoid-2.4.7/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.2 vendor/bundle/gems/mongoid-2.4.9/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.1 vendor/bundle/gems/mongoid-2.4.9/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.1 vendor/bundle/gems/mongoid-2.4.10/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.1 vendor/bundle/gems/mongoid-2.4.7/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.0 vendor/bundle/gems/mongoid-2.4.10/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.0 vendor/bundle/gems/mongoid-2.4.7/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.6.0 vendor/bundle/gems/mongoid-2.4.9/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.5.17 vendor/bundle/gems/mongoid-2.4.7/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.5.17 vendor/bundle/gems/mongoid-2.4.9/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.5.17 vendor/bundle/gems/mongoid-2.4.10/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.5.16 vendor/bundle/gems/mongoid-2.4.10/lib/rails/generators/mongoid/observer/observer_generator.rb
classiccms-0.5.16 vendor/bundle/gems/mongoid-2.4.9/lib/rails/generators/mongoid/observer/observer_generator.rb