-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bicycle & driving type to return projects in diff order
- Loading branch information
1 parent
f3688da
commit 790f3d5
Showing
3 changed files
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
collection :@projects | ||
|
||
attributes :id, :name, :description, :sponsor, :address, :background, :image, :unit_type, :unit_steps_count | ||
|
||
node(:distance) do |pro| | ||
"#{pro.distance([params[:coordinates].try(&:first).to_f, params[:coordinates].try(&:last).to_f])} km" | ||
node(:projects) do | ||
@projects.map do |v| | ||
partial 'projects/project', object: v | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
attributes :id, :name, :description, :sponsor, :address, :background, :image, :unit_type, :unit_steps_count | ||
|
||
node(:distance) do |pro| | ||
"#{pro.distance([params[:coordinates].try(&:first).to_f, params[:coordinates].try(&:last).to_f])} km" | ||
end |