trollo 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ module Trollo
2
+
3
+ class Board < ActiveRecord::Base
4
+ has_and_belongs_to_many :lists
5
+ has_many :subscriptions, dependent: :destroy
6
+ attr_accessible :name
7
+ end
8
+
9
+ end
data/lib/trollo/list.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  module Trollo
2
2
 
3
3
  class List < ActiveRecord::Base
4
- include Troller
5
-
4
+ has_and_belongs_to_many :boards
6
5
  has_many :cards, order: 'due_at ASC', dependent: :destroy
7
6
  has_and_belongs_to_many :labels, join_table: 'trollo_labels_lists'
8
- has_many :subscriptions, dependent: :destroy
9
- attr_accessible :name, :trollable
7
+ attr_accessible :name
8
+
9
+ def named(name)
10
+ where(name: name).first
11
+ end
10
12
 
11
13
  def add_label(name)
12
14
  return if has_label?(name)
@@ -1,7 +1,7 @@
1
1
  module Trollo
2
2
 
3
3
  class Subscription < ActiveRecord::Base
4
- belongs_to :list
4
+ belongs_to :board
5
5
  belongs_to :subscriber, polymorphic: true
6
6
  end
7
7
 
@@ -1,3 +1,3 @@
1
1
  module Trollo
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trollo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-25 00:00:00.000000000 Z
12
+ date: 2014-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -140,6 +140,7 @@ files:
140
140
  - lib/generators/active_record/templates/migration.rb
141
141
  - lib/generators/active_record/trollo_generator.rb
142
142
  - lib/trollo.rb
143
+ - lib/trollo/board.rb
143
144
  - lib/trollo/card.rb
144
145
  - lib/trollo/label.rb
145
146
  - lib/trollo/list.rb