Sha256: e22ecef0fbb6c61340bd3bcb9f1fc4bec3961b6899dca07e2c3db85ef7ac2c0c
Contents?: true
Size: 741 Bytes
Versions: 62
Compression:
Stored size: 741 Bytes
Contents
module Hobo class UserControllerGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) # overrides the default argument :name, :type => :string, :default => 'users', :optional => true include Generators::Hobo::Controller include Generators::Hobo::InviteOnly def self.banner "rails generate hobo:user_controller [NAME=users] [options]" end def generate_controller template 'controller.rb.erb', File.join('app/controllers',"#{file_path}_controller.rb") end def generate_accept_invitation return unless invite_only? template "accept_invitation.dryml", File.join('app/views', file_path, "accept_invitation.dryml") end end end
Version data entries
62 entries across 62 versions & 1 rubygems