Sha256: 88f53a122ef52fcff49224f49db5ff68823b8a280d4657bac9266ad32694a0b8

Contents?: true

Size: 324 Bytes

Versions: 1

Compression:

Stored size: 324 Bytes

Contents

class SearchGenerator < Rails::Generators::NamedBase
  source_root File.expand_path('../templates', __FILE__)
  argument :search_generator, type: :string
  def method_name
    generate_jsfile
  end


  private
  def generate_jsfile
    template "search.template", "app/assets/javascripts/#{search.underscore}.js"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
search_youtube-0.1.3 lib/generators/search/search_generator.rb