forked from openstreetmap/openstreetmap-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00b3d9a
commit 59186c8
Showing
7 changed files
with
37 additions
and
14 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,13 +1,11 @@ | ||
json.user_block do | ||
json.id user_block.id | ||
json.created_at user_block.created_at.xmlschema | ||
json.updated_at user_block.updated_at.xmlschema | ||
json.ends_at user_block.ends_at.xmlschema | ||
json.needs_view user_block.needs_view | ||
json.id user_block.id | ||
json.created_at user_block.created_at.xmlschema | ||
json.updated_at user_block.updated_at.xmlschema | ||
json.ends_at user_block.ends_at.xmlschema | ||
json.needs_view user_block.needs_view | ||
|
||
json.user :uid => user_block.user_id, :user => user_block.user.display_name | ||
json.creator :uid => user_block.creator_id, :user => user_block.creator.display_name | ||
json.revoker :uid => user_block.revoker_id, :user => user_block.revoker.display_name if user_block.revoker | ||
json.user :uid => user_block.user_id, :user => user_block.user.display_name | ||
json.creator :uid => user_block.creator_id, :user => user_block.creator.display_name | ||
json.revoker :uid => user_block.revoker_id, :user => user_block.revoker.display_name if user_block.revoker | ||
|
||
json.reason user_block.reason | ||
end | ||
json.reason user_block.reason unless @skip_reason |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
json.partial! "api/root_attributes" | ||
|
||
json.user_blocks do | ||
json.array! @user_blocks, :partial => "api/user_blocks/user_block", :as => :user_block | ||
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 @@ | ||
xml.instruct! | ||
|
||
xml.osm(OSM::API.new.xml_root_attributes) do |osm| | ||
osm << (render(:partial => "api/user_blocks/user_block", :collection => @user_blocks) || "") | ||
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
json.partial! "api/root_attributes" | ||
|
||
json.partial! @user_block | ||
json.user_block do | ||
json.partial! @user_block | ||
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