Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

root and parent don't belong to Configurable

  • Loading branch information...
commit 1d19bf5d96a68493266a69e28c916c7a21754cb4 1 parent 4c12411
@bbenezech bbenezech authored
View
1  .rspec
@@ -1,2 +1 @@
--color
---order random
View
5 lib/rails_admin/config/actions/base.rb
@@ -9,7 +9,7 @@ class Base
include RailsAdmin::Config::Proxyable
include RailsAdmin::Config::Configurable
include RailsAdmin::Config::Hideable
-
+
# http://twitter.github.com/bootstrap/base-css.html#icons
register_instance_option :link_icon do
'icon-question-sign'
@@ -41,7 +41,8 @@ class Base
# This block is evaluated in the context of the controller when action is called
# You can access:
- # - @abstract_model & @model_config if your on a model or object scope
+ # - @objects if you're on a model scope
+ # - @abstract_model & @model_config if you're on a model or object scope
# - @object if you're on an object scope
register_instance_option :controller do
Proc.new do
View
4 lib/rails_admin/config/configurable.rb
@@ -1,10 +1,8 @@
module RailsAdmin
module Config
- # A base class for all configurables.
+ # A module for all configurables.
module Configurable
- attr_reader :parent, :root
-
def self.included(base)
base.send :extend, ClassMethods
end
View
1  lib/rails_admin/config/fields/base.rb
@@ -18,6 +18,7 @@ class Base
attr_reader :name, :properties, :abstract_model
attr_accessor :defined, :order, :section
+ attr_reader :parent, :root
def self.inherited(klass)
klass.instance_variable_set("@view_helper", :text_field)
View
1  lib/rails_admin/config/fields/group.rb
@@ -14,6 +14,7 @@ class Group
attr_reader :name, :abstract_model
attr_accessor :section
+ attr_reader :parent, :root
def initialize(parent, name)
@parent = parent
View
1  lib/rails_admin/config/model.rb
@@ -21,6 +21,7 @@ class Model
attr_reader :abstract_model
attr_accessor :groups
+ attr_reader :parent, :root
def initialize(entity)
@parent = nil
View
1  lib/rails_admin/config/sections/base.rb
@@ -15,6 +15,7 @@ class Base
include RailsAdmin::Config::HasGroups
attr_reader :abstract_model
+ attr_reader :parent, :root
def initialize(parent)
@parent = parent
Please sign in to comment.
Something went wrong with that request. Please try again.