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