Class: Couchbase::Generators::ViewGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Couchbase::Generators::ViewGenerator
- Defined in:
- lib/rails/generators/couchbase/view/view_generator.rb
Instance Method Summary collapse
Instance Method Details
#app_name ⇒ Object
32 33 34 |
# File 'lib/rails/generators/couchbase/view/view_generator.rb', line 32 def app_name Rails::Application.subclasses.first.parent.to_s.underscore end |
#create_map_reduce_files ⇒ Object
36 37 38 39 |
# File 'lib/rails/generators/couchbase/view/view_generator.rb', line 36 def create_map_reduce_files template 'map.js', File.join('app', 'models', model_name, view_name, 'map.js') template 'reduce.js', File.join('app', 'models', model_name, view_name, 'reduce.js') end |