trollo 0.1.8 → 0.1.9

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.
@@ -6,13 +6,10 @@ class CreateTrolloTables < ActiveRecord::Migration
6
6
  t.timestamps
7
7
  end
8
8
 
9
- create_table :boards_lists do |t|
10
- t.references :board
11
- t.references :list
12
- end
13
-
14
9
  create_table :trollo_lists do |t|
10
+ t.references :board
15
11
  t.string :name
12
+ t.integer :ordinal
16
13
  t.timestamps
17
14
  end
18
15
 
data/lib/trollo/board.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Trollo
2
2
 
3
3
  class Board < ActiveRecord::Base
4
- has_and_belongs_to_many :lists
4
+ has_many :lists, order: 'ordinal ASC', dependent: :destroy
5
5
  has_many :subscriptions, dependent: :destroy
6
6
  attr_accessible :name
7
7
  end
data/lib/trollo/list.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Trollo
2
2
 
3
3
  class List < ActiveRecord::Base
4
- has_and_belongs_to_many :boards
4
+ belongs_to :board
5
5
  has_many :cards, order: 'due_at ASC', dependent: :destroy
6
6
  has_and_belongs_to_many :labels, join_table: 'trollo_labels_lists'
7
7
  attr_accessible :name
@@ -1,3 +1,3 @@
1
1
  module Trollo
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -4,14 +4,11 @@ ActiveRecord::Schema.define do
4
4
  t.string :name
5
5
  t.timestamps
6
6
  end
7
-
8
- create_table :boards_lists do |t|
9
- t.references :board
10
- t.references :list
11
- end
12
7
 
13
8
  create_table :trollo_lists do |t|
9
+ t.references :board
14
10
  t.string :name
11
+ t.integer :ordinal
15
12
  t.timestamps
16
13
  end
17
14
 
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.8
4
+ version: 0.1.9
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-27 00:00:00.000000000 Z
12
+ date: 2014-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport