Class: Dawanda::Channel

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/dawanda/channel.rb

Overview

Channel

Dawanda::Channel are a top hierachy to categories.

Represents a single Dawanda::Channel - has the following attributes:

id

The unique identifier for this channel

name

This channels’s name

categories

The categories that belong to this channel

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model

included

Class Method Details

.all(params = {}) ⇒ Object

[View source]

27
28
29
# File 'lib/dawanda/channel.rb', line 27

def self.all(params = {})
  find_all_by_method('channels')
end

Instance Method Details

#categories(params = {}) ⇒ Object

Get all categories for this channel.

[View source]

23
24
25
# File 'lib/dawanda/channel.rb', line 23

def categories(params = {})
  @categories ||= Category.find_all_by_channel_id(id, params)
end