mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-25 00:08:25 -04:00
Clean up a bit as per #1013 with TODO comments
This commit is contained in:
1 parent
efd112c4b8
commit
6b059cb4f4
1 file changed
+9
-1
@@ -83,8 +83,16 @@ class CropsController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.html # show.html.haml
|
||||
format.json do
|
||||
# TODO RABL or similar one day to avoid presentation logic here
|
||||
owner_structure = {
|
||||
owner: {
|
||||
only: [:id, :login_name, :location, :latitude, :longitude]
|
||||
}
|
||||
}
|
||||
render json: @crop.to_json(include: {
|
||||
plantings: { include: { owner: { only: [:id, :login_name, :location, :latitude, :longitude] }}}
|
||||
plantings: {
|
||||
include: owner_structure
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user