module RoleBasedSecurity module Generators class RoleBasedSecurityGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) def generate_role_based_security copy_file "role.rb", "app/models/role.rb" copy_file "user_role.rb", "app/models/user_role.rb" copy_file "20110510155623_create_roles.rb", "db/migrate/20110510155623_create_roles.rb" copy_file "20110510155626_create_user_roles.rb", "db/migrate/20110510155626_create_user_roles.rb" end end end end