Skip to content

Commit

Permalink
Merge 71404fe into 0af2fdc
Browse files Browse the repository at this point in the history
  • Loading branch information
timoschilling committed Aug 28, 2014
2 parents 0af2fdc + 71404fe commit 2fb10b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions lib/generators/active_admin/assets/assets_generator.rb
Expand Up @@ -2,9 +2,7 @@ module ActiveAdmin
module Generators
class AssetsGenerator < Rails::Generators::Base

def self.source_root
@_active_admin_source_root ||= File.expand_path("../templates", __FILE__)
end
source_root File.expand_path("../templates", __FILE__)

def install_assets
template 'active_admin.js.coffee', 'app/assets/javascripts/active_admin.js.coffee'
Expand Down
4 changes: 1 addition & 3 deletions lib/generators/active_admin/install/install_generator.rb
Expand Up @@ -8,9 +8,7 @@ class InstallGenerator < ActiveRecord::Generators::Base

hook_for :users, default: "devise", desc: "Admin user generator to run. Skip with --skip-users"

def self.source_root
@_active_admin_source_root ||= File.expand_path("../templates", __FILE__)
end
source_root File.expand_path("../templates", __FILE__)

def copy_initializer
@underscored_user_name = name.underscore
Expand Down
4 changes: 1 addition & 3 deletions lib/generators/active_admin/resource/resource_generator.rb
Expand Up @@ -3,9 +3,7 @@ module Generators
class ResourceGenerator < Rails::Generators::NamedBase
desc "Registers resources with Active Admin"

def self.source_root
@_active_admin_source_root ||= File.expand_path("../templates", __FILE__)
end
source_root File.expand_path("../templates", __FILE__)

def generate_config_file
template "admin.rb", "app/admin/#{file_path.gsub('/', '_')}.rb"
Expand Down

0 comments on commit 2fb10b1

Please sign in to comment.