Permalink
Browse files

Other fixes index/find_target to make them tolerant to missing model …

…and bumped version to 4.6.9
  • Loading branch information...
1 parent 74f7236 commit 289587415190603bd25c4bc4e3b404b5b35f2e36 @vihai vihai committed May 16, 2012
Showing with 3 additions and 5 deletions.
  1. +1 −2 lib/active_rest/controller.rb
  2. +1 −2 lib/active_rest/controller/rest.rb
  3. +1 −1 lib/active_rest/version.rb
@@ -113,8 +113,7 @@ class << self
# member requests
before_filter :only => [ :show, :edit, :update, :destroy, :validate_update ] do
- @target_relation = model.scoped
- @target_relation = @target_relation.includes(model.interfaces[:rest].eager_loading_hints(:view => rest_view)) if model
+ @target_relation = model.scoped.includes(model.interfaces[:rest].eager_loading_hints(:view => rest_view)) if model
find_target
true
end
@@ -65,8 +65,7 @@ def schema
end
def index
- @targets_relation = model.scoped
- @targets_relation = @targets_relation.includes(model.interfaces[:rest].eager_loading_hints(:view => rest_view)) if model
+ @targets_relation = model.scoped.includes(model.interfaces[:rest].eager_loading_hints(:view => rest_view)) if model
find_targets
@@ -1,3 +1,3 @@
module ActiveRest
- VERSION = '4.6.8'
+ VERSION = '4.6.9'
end

0 comments on commit 2895874

Please sign in to comment.