class Opalla::CollectionGenerator

Public Instance Methods

create_collection() click to toggle source
# File lib/rails/generators/opalla/collection_generator.rb, line 5
    def create_collection
      create_file js("collections/#{file_name}.rb"), <<~CONTROLLER
        class #{class_name} < Opalla::Collection
          # attr_reader :attrs
        end
      CONTROLLER
    end

Protected Instance Methods

js(path) click to toggle source
# File lib/rails/generators/opalla/collection_generator.rb, line 15
def js(path)
  "app/assets/javascripts/#{path}"
end