Class: Node
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Node
- Extended by:
- FriendlyId
- Defined in:
- app/models/node.rb
Instance Attribute Summary collapse
-
#seed ⇒ Object
Virtual attrs.
Instance Method Summary collapse
-
#is_destroyable? ⇒ Boolean
> For form.
-
#to_partial_path ⇒ Object
> Partial Path => www.cookieshq.co.uk/posts/rails-tips-to-partial-path/.
Instance Attribute Details
#seed ⇒ Object
Virtual attrs
9 10 11 |
# File 'app/models/node.rb', line 9 def seed @seed end |
Instance Method Details
#is_destroyable? ⇒ Boolean
> For form
45 46 47 |
# File 'app/models/node.rb', line 45 def is_destroyable? true end |
#to_partial_path ⇒ Object
> Partial Path
> www.cookieshq.co.uk/posts/rails-tips-to-partial-path/
40 41 42 |
# File 'app/models/node.rb', line 40 def to_partial_path self.class.name.underscore # => http://blog.obiefernandez.com/content/2012/01/rendering-collections-of-heterogeneous-objects-in-rails-32.html end |