Sha256: 21de4c0078327d08d1db00c656f0060f02bc8dc310e142198aa8f37541052e3f

Contents?: true

Size: 603 Bytes

Versions: 5

Compression:

Stored size: 603 Bytes

Contents

# inspired by devise and forem
require 'rails/generators'

module Rapidfire
  module Generators
    class ViewsGenerator < Rails::Generators::Base
      source_root File.expand_path("../../../../app/views/rapidfire", __FILE__)
      desc "Copies default Rapidfire views to your application."

      def copy_views
        view_directory :answer_groups
        view_directory :answers
        view_directory :question_groups
        view_directory :questions
      end

      protected
      def view_directory(name)
        directory name.to_s, "app/views/rapidfire/#{name}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rapidfire-2.1.0 lib/generators/rapidfire/views_generator.rb
rapidfire-2.0.0 lib/generators/rapidfire/views_generator.rb
unique_rapidfire-1.0.0 lib/generators/rapidfire/views_generator.rb
rapidfire-1.2.0 lib/generators/rapidfire/views_generator.rb
rapidfire-1.0.0 lib/generators/rapidfire/views_generator.rb