versioncake 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/versioncake/action_controller/versioning.rb +1 -1
- data/lib/versioncake/version.rb +1 -1
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -48,7 +48,7 @@ class PostsController < ApplicationController
|
|
48
48
|
@posts = Post.scoped
|
49
49
|
|
50
50
|
# version 3 or greated supports embedding post comments
|
51
|
-
if
|
51
|
+
if derived_version >= 3
|
52
52
|
@posts = @posts.includes(:comments)
|
53
53
|
end
|
54
54
|
end
|
@@ -199,7 +199,7 @@ def index
|
|
199
199
|
@posts = Post.scoped
|
200
200
|
|
201
201
|
# version 3 or greated supports embedding post comments
|
202
|
-
if
|
202
|
+
if derived_version >= 3
|
203
203
|
@posts = @posts.includes(:comments)
|
204
204
|
end
|
205
205
|
end
|
@@ -18,7 +18,7 @@ module ActionController #:nodoc:
|
|
18
18
|
@derived_version = ActionView::Template::Versions.latest_version
|
19
19
|
elsif ActionView::Template::Versions.supports_version? @requested_version
|
20
20
|
@derived_version = @requested_version
|
21
|
-
elsif requested_version > ActionView::Template::Versions.latest_version
|
21
|
+
elsif @requested_version > ActionView::Template::Versions.latest_version
|
22
22
|
raise ActionController::RoutingError.new("No route match for version")
|
23
23
|
else
|
24
24
|
raise ActionController::RoutingError.new("Version is deprecated")
|
data/lib/versioncake/version.rb
CHANGED