wheels 0.0.32 → 0.0.33

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.32
1
+ 0.0.33
@@ -1,16 +1,21 @@
1
1
  class BlogsController < InheritedResources::Base
2
2
  respond_to :html, :xml
3
- before_filter
3
+ before_filter :load_maybe
4
4
  has_scope :tagged_with, :as => :tag
5
5
  belongs_to :user, :optional => true
6
6
 
7
+ def load_maybe
8
+ unless params[:user_id]
9
+ @user = (current_user || User.root)
10
+ end
11
+ end
12
+
7
13
  def collection
8
14
  @blogs ||= end_of_association_chain.
9
15
  paginate(:page => params[:page], :order => 'created_at DESC' )
10
16
  end
11
17
 
12
18
  def begin_of_association_chain
13
- @user ||= (current_user || User.root)
14
19
  @tags = Blog.where(:user_id=>@user.id).tag_counts.sort{|t, u| t.count <=> u.count}
15
20
  return @user
16
21
  end
data/wheels.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wheels}
8
- s.version = "0.0.32"
8
+ s.version = "0.0.33"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tyler Gannon"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wheels
3
3
  version: !ruby/object:Gem::Version
4
- hash: 95
4
+ hash: 93
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 32
10
- version: 0.0.32
9
+ - 33
10
+ version: 0.0.33
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tyler Gannon