Sha256: 2990dfb5853f5d018c6e5011847cf466024c266c2a5914fc6312f3bcaed45109

Contents?: true

Size: 778 Bytes

Versions: 18

Compression:

Stored size: 778 Bytes

Contents

# Thanks to plataformatec/devise
# The code used to inspire this generator!
require 'rails/generators'
module MongoidForums
  module Generators
    class ViewsGenerator < Rails::Generators::Base #:nodoc:
      source_root File.expand_path("../../../../app/views/mongoid_forums", __FILE__)
      desc "Used to copy Mongoid Forum's views to your application's views."

      def copy_views
        view_directory :admin
        #view_directory :categories
        view_directory :forums
        #view_directory :moderation
        view_directory :posts
        #view_directory :subscription_mailer
        view_directory :topics
      end

      protected

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

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
mongoid-forums-1.0.7 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-1.0.6 lib/generators/mongoid_forums/views_generator.rb
ack-mongoid-forums-1.0.6.1 lib/generators/mongoid_forums/views_generator.rb
ack-mongoid-forums-1.0.6 lib/generators/mongoid_forums/views_generator.rb
ack-mongoid-forums-1.0.5 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-1.0.4 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-1.0.3 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-1.0.2 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-1.0.1 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-1.0.0 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.11 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.10 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.9 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.5 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.4 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.3 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.2 lib/generators/mongoid_forums/views_generator.rb
mongoid-forums-0.0.1 lib/generators/mongoid_forums/views_generator.rb