Sha256: e4b3580a87098cf23105bdb9d3cf0912bae8f6796dfa629cef140e01ff61b3bd

Contents?: true

Size: 415 Bytes

Versions: 3

Compression:

Stored size: 415 Bytes

Contents

require 'rails/generators/ripple_generator'

module Ripple
  module Generators
    class ObserverGenerator < NamedBase
      desc 'Creates an observer for Ripple documents'
      check_class_collision :suffix => "Observer"

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

      hook_for :test_framework
    end
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
wyngle-ripple-0.1.0 lib/rails/generators/ripple/observer/observer_generator.rb
better-ripple-1.0.0 lib/rails/generators/ripple/observer/observer_generator.rb
ripple-1.0.0.beta2 lib/rails/generators/ripple/observer/observer_generator.rb