]> git.openstreetmap.org Git - rails.git/blob - app/views/api/user_blocks/_user_block.xml.builder
Merge remote-tracking branch 'upstream/pull/4240'
[rails.git] / app / views / api / user_blocks / _user_block.xml.builder
1 attrs = {
2   "id" => user_block.id,
3   "created_at" => user_block.created_at.xmlschema,
4   "updated_at" => user_block.updated_at.xmlschema,
5   "ends_at" => user_block.ends_at.xmlschema,
6   "needs_view" => user_block.needs_view
7 }
8
9 xml.user_block(attrs) do
10   xml.user :uid => user_block.user_id, :user => user_block.user.display_name
11   xml.creator :uid => user_block.creator_id, :user => user_block.creator.display_name
12   xml.revoker :uid => user_block.revoker_id, :user => user_block.revoker.display_name if user_block.revoker
13   xml.reason user_block.reason
14 end