Sha256: d7ce03eb46e28185c4ffcb850141709e026714f2ce0022a7931290d07f6af300
Contents?: true
Size: 589 Bytes
Versions: 24
Compression:
Stored size: 589 Bytes
Contents
module Riveter module Generators class QueryGenerator < ::Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) check_class_collision :suffix => 'Query' def create_query_file template 'query.rb', File.join('app/queries', class_path, "#{file_name}_query.rb") end def create_module_file return if regular_class_path.empty? template 'module.rb', File.join('app/queries', "#{class_path.join('/')}.rb") if behavior == :invoke end hook_for :test_framework, :as => :query end end end
Version data entries
24 entries across 24 versions & 1 rubygems