Class: RailsAdmin::Adapters::Mongoid::Association
- Inherits:
-
Object
- Object
- RailsAdmin::Adapters::Mongoid::Association
- Defined in:
- lib/rails_admin/adapters/mongoid.rb
Instance Attribute Summary collapse
-
#association ⇒ Object
readonly
Returns the value of attribute association.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(association, model) ⇒ Association
constructor
A new instance of Association.
- #to_options_hash ⇒ Object
Constructor Details
#initialize(association, model) ⇒ Association
Returns a new instance of Association.
262 263 264 265 266 |
# File 'lib/rails_admin/adapters/mongoid.rb', line 262 def initialize(association, model) @association = association @model = model = association. end |
Instance Attribute Details
#association ⇒ Object (readonly)
Returns the value of attribute association.
261 262 263 |
# File 'lib/rails_admin/adapters/mongoid.rb', line 261 def association @association end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
261 262 263 |
# File 'lib/rails_admin/adapters/mongoid.rb', line 261 def model @model end |
Instance Method Details
#to_options_hash ⇒ Object
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/rails_admin/adapters/mongoid.rb', line 268 def { name: name.to_sym, pretty_name: display_name, type: type_lookup, model_proc: proc { model_proc_lookup }, primary_key_proc: proc { primary_key_lookup }, foreign_key: foreign_key_lookup, foreign_type: foreign_type_lookup, foreign_inverse_of: foreign_inverse_of_lookup, as: as_lookup, polymorphic: polymorphic_lookup, inverse_of: inverse_of_lookup, read_only: nil, nested_form: } end |