rails_db_admin 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,9 @@ module RailsDbAdmin
9
9
  Rails.configuration.database_configuration.each do |k, v|
10
10
  result[:databases] << {:display => k, :value => k}
11
11
  end
12
+
13
+ result[:databases].delete_if{|v| v[:value] == Rails.env}
14
+ result[:databases].unshift({:value => Rails.env, :display => Rails.env})
12
15
 
13
16
  render :json => result
14
17
  end
@@ -2,7 +2,7 @@ module RailsDbAdmin
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
@@ -4,7 +4,6 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.DatabaseComboBox",{
4
4
  initComponent: function() {
5
5
 
6
6
  var databaseJsonStore = new Ext.data.Store({
7
- autoLoad:true,
8
7
  timeout:60000,
9
8
  proxy: {
10
9
  type: 'ajax',
@@ -38,12 +37,14 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.DatabaseComboBox",{
38
37
  triggerAction:'all',
39
38
  editable:false,
40
39
  forceSelection:true,
41
- mode:'local',
42
- //value:'development',
40
+ queryMode: 'local',
43
41
  listeners:{
44
42
  'select':function(combo, record, index){
45
43
  // switch databases
46
44
  combo.initialConfig.module.connectToDatatbase();
45
+ },
46
+ render:function(combo){
47
+ combo.getStore().load();
47
48
  }
48
49
  }
49
50
  }, config);