Permalink
Browse files

Updated the admin filters and dynamic model loading

  • Loading branch information...
1 parent cf8aa13 commit eea9136c9ac92b79cbccacac4a48ff73bb9618eb @TeckniX committed Feb 17, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 Controller/ActiveAdminAppController.php
@@ -15,13 +15,11 @@ function beforeFilter(){
$pluginName = Inflector::camelize(Inflector::singularize($this->request->params['plugin']));
if(!empty($pluginName)){
$this->loadModel($pluginName.".".$modelName);
- $this->set('modelName',$pluginName.".".$modelName);
}else{
$this->loadModel($modelName);
- $this->set('modelName',$modelName);
}
$displayField = $this->{$modelName}->displayField;
- $this->set(compact('adminMenu','displayField'));
+ $this->set(compact('adminMenu','displayField','modelName'));
}
}

0 comments on commit eea9136

Please sign in to comment.