Module: ActsAsKaltura::Category::ClassMethods
- Defined in:
- lib/acts_as_kaltura/category.rb
Instance Method Summary collapse
- #acts_as_kaltura_category(options = {}) ⇒ Object
-
#kaltura_parent_categories ⇒ Object
Retrieve all categories from kaltura which has no parent id.
Instance Method Details
#acts_as_kaltura_category(options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/acts_as_kaltura/category.rb', line 8 def acts_as_kaltura_category( = {}) self. = before_create :create_kaltura_category before_update :update_kaltura_category before_destroy :destroy_kaltura_category end |
#kaltura_parent_categories ⇒ Object
Retrieve all categories from kaltura which has no parent id
18 19 20 21 22 |
# File 'lib/acts_as_kaltura/category.rb', line 18 def kaltura_parent_categories filter = Kaltura::Filter::CategoryFilter.new filter.parent_id_equal = 0 self.kaltura_client.category_service.list(filter) end |