tkh_content 0.9.12 → 0.9.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7e2c1f257bbe3dc334d558b9ac14d3f960b74e5
4
- data.tar.gz: 9b0901d4ff17044c6872ca01d1880069178f45a8
3
+ metadata.gz: 0f1299f00737d0fcd79b3bff61ca328e1fefaa37
4
+ data.tar.gz: 84c386de8854a6fc771bcfb38d851aeecc92d5be
5
5
  SHA512:
6
- metadata.gz: 88762d950ff258fa0715bca02e11b6496e33d845c1a913c237f5e0174c55fb81aacc9144099a225a2338fcbd65f9c430c35f9820662e170d7c75515dbd4adc4e
7
- data.tar.gz: c7cb2e260521daae831c886e8036187378cc24bf56948153081c348a48b06e9048a0beafc48860b474cd88ab032db9f149a37bde65015b4f17a9ea1e5153236b
6
+ metadata.gz: 48cd636a0a70e50b4c4737cc7a6fe8bbafd1d3aa2214bee997389150c4306038cbb458f0afb9c9f713a36683d26c77e08d95ac04aabd2589d7ff589e15f0df0c
7
+ data.tar.gz: 4ae4761cf0e0bdc33621bfc49a4516b0da00b5ab973779309dff6a1f2e9fae3cee66c45bc6661482393c9af9adfbe9cd28cb702e84cc3370aa0361920ed29092
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.9.13
6
+
7
+ * Added dependent destroy to the page-tagging and tag-tagging associations.
8
+
9
+
5
10
  ## 0.9.12
6
11
 
7
12
  * Debugged tag destroying
@@ -10,7 +10,7 @@ class BlogController < ApplicationController
10
10
 
11
11
  def by_tag
12
12
  @tag = Tag.where('name = ?', params[:id]).first
13
- @posts = @tag.pages.order('published_at desc').paginate(:page => params[:page], :per_page => 20)
13
+ @posts = @tag.pages.published.order('published_at desc').paginate(:page => params[:page], :per_page => 20)
14
14
  render :layout => 'blog'
15
15
  end
16
16
 
data/app/models/page.rb CHANGED
@@ -8,7 +8,7 @@ class Page < ActiveRecord::Base
8
8
  belongs_to :author, class_name: 'User'
9
9
  has_many :comments, :dependent => :destroy
10
10
 
11
- has_many :taggings
11
+ has_many :taggings, :dependent => :destroy
12
12
  has_many :tags, through: :taggings
13
13
 
14
14
  validates_presence_of :title
data/app/models/tag.rb CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  class Tag < ActiveRecord::Base
7
7
 
8
- has_many :taggings
8
+ has_many :taggings, :dependent => :destroy
9
9
  has_many :pages, through: :taggings
10
10
 
11
11
  translates :name
@@ -1,3 +1,3 @@
1
1
  module TkhContent
2
- VERSION = "0.9.12"
2
+ VERSION = "0.9.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.12
4
+ version: 0.9.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swami Atma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails