public
Description: Merb ActiveAdmin for Sequel
Clone URL: git://github.com/canadaduane/merb_active_admin.git
Remove filtering of joiner tables from ActiveAdmin.  Users can choose not 
to 'include ActiveAdmin' in joiner tables if they don't want them in 
ActiveAdmin.
canadaduane (author)
Tue Apr 22 19:14:55 -0700 2008
commit  342bb1dc27d900e8540949c81b44faa12af8fff3
tree    6bc78fa9d709b9b2dc7f2f51b0fc248dcb87599c
parent  530ebd594899daba31e90333c54050b986d0d4b4
...
2
3
4
5
6
7
8
9
10
11
 
 
12
13
14
...
2
3
4
 
 
 
 
 
 
 
5
6
7
8
9
0
@@ -2,13 +2,8 @@
0
 if defined?(Merb::Plugins)
0
   def Merb.active_admin_default_header_models
0
     hm = Merb::Plugins.config[:merb_active_admin][:header_models]
0
- if hm.empty?
0
- # Consider it a joiner table if all columns end in "id"
0
- joiner = proc{ |model| model.columns.all?{ |c| c.to_s =~ /id$/ } }
0
- defaults = ActiveAdmin.registered_models.reject{ |m| joiner[m] }
0
- # Use the first 5 non-joiner tables as defaults
0
- hm.replace defaults[0..4]
0
- end
0
+ # Use the first 5 tables as defaults
0
+ hm.replace defaults[0..4] if hm.empty?
0
   end
0
   
0
   # Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in your piece of it

Comments

    No one has commented yet.