Skip to content

Commit

Permalink
Implement field aliasing in relationship endpoint queried_association…
Browse files Browse the repository at this point in the history
… helper
  • Loading branch information
nicklandgrebe committed Apr 3, 2017
1 parent aeef650 commit e456bec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/caprese/controller/concerns/relationships.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def update_relationship_definition
def queried_association
unless @queried_association
begin
@queried_association = queried_record.association(params[:relationship])
@queried_association = queried_record.association(actual_field(params[:relationship]))
rescue ActiveRecord::AssociationNotFoundError => e
fail AssociationNotFoundError.new(params[:relationship])
end
Expand Down

0 comments on commit e456bec

Please sign in to comment.