Class: AdminGemsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/admin_gems_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/admin_gems_controller.rb', line 6

def index
	#mygems = Bundler.load.specs.map { |spec| spec.name }

	if Rails::VERSION::MAJOR < 3
		application_gems = Rails.configuration.gems
	else
		application_gems = Bundler.load.specs
	end

	@application_gems = application_gems.collect{|g|
		[
			g.name,
			( (Rails::VERSION::MAJOR < 3) ? g.requirement : g.version.to_s ) || '?'
		]
	}.sort!{|a, b|
		a[0] <=> b[0]
	}
end