Move changeset builder views to the api namespace
This commit is contained in:
parent
538bfed8a6
commit
656ed0af76
5 changed files with 11 additions and 11 deletions
|
@ -42,7 +42,7 @@ module Api
|
||||||
|
|
||||||
# Return a copy of the updated changeset
|
# Return a copy of the updated changeset
|
||||||
@changeset = changeset
|
@changeset = changeset
|
||||||
render "changesets/changeset"
|
render "api/changesets/changeset"
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -62,7 +62,7 @@ module Api
|
||||||
|
|
||||||
# Return a copy of the updated changeset
|
# Return a copy of the updated changeset
|
||||||
@changeset = comment.changeset
|
@changeset = comment.changeset
|
||||||
render "changesets/changeset"
|
render "api/changesets/changeset"
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -82,7 +82,7 @@ module Api
|
||||||
|
|
||||||
# Return a copy of the updated changeset
|
# Return a copy of the updated changeset
|
||||||
@changeset = comment.changeset
|
@changeset = comment.changeset
|
||||||
render "changesets/changeset"
|
render "api/changesets/changeset"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,7 +43,7 @@ module Api
|
||||||
def show
|
def show
|
||||||
@changeset = Changeset.find(params[:id])
|
@changeset = Changeset.find(params[:id])
|
||||||
@include_discussion = params[:include_discussion].presence
|
@include_discussion = params[:include_discussion].presence
|
||||||
render "changesets/changeset"
|
render "changeset"
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -105,7 +105,7 @@ module Api
|
||||||
# will include the bigger bounding box.
|
# will include the bigger bounding box.
|
||||||
cs.save!
|
cs.save!
|
||||||
@changeset = cs
|
@changeset = cs
|
||||||
render "changesets/changeset"
|
render "changeset"
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -222,7 +222,7 @@ module Api
|
||||||
|
|
||||||
# preload users, tags and comments, and render result
|
# preload users, tags and comments, and render result
|
||||||
@changesets = changesets.preload(:user, :changeset_tags, :comments)
|
@changesets = changesets.preload(:user, :changeset_tags, :comments)
|
||||||
render "changesets/changesets"
|
render "changesets"
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -242,7 +242,7 @@ module Api
|
||||||
|
|
||||||
check_changeset_consistency(@changeset, current_user)
|
check_changeset_consistency(@changeset, current_user)
|
||||||
@changeset.update_from(new_changeset, current_user)
|
@changeset.update_from(new_changeset, current_user)
|
||||||
render "changesets/changeset"
|
render "changeset"
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -263,7 +263,7 @@ module Api
|
||||||
|
|
||||||
# Return a copy of the updated changeset
|
# Return a copy of the updated changeset
|
||||||
@changeset = changeset
|
@changeset = changeset
|
||||||
render "changesets/changeset"
|
render "changeset"
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -284,7 +284,7 @@ module Api
|
||||||
|
|
||||||
# Return a copy of the updated changeset
|
# Return a copy of the updated changeset
|
||||||
@changeset = changeset
|
@changeset = changeset
|
||||||
render "changesets/changeset"
|
render "changeset"
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -3,5 +3,5 @@ xml.instruct! :xml, :version => "1.0"
|
||||||
# basic attributes
|
# basic attributes
|
||||||
|
|
||||||
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
|
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
|
||||||
osm << render(:partial => "changesets/changeset.builder", :locals => { :changeset => @changeset })
|
osm << render(:partial => "api/changesets/changeset.builder", :locals => { :changeset => @changeset })
|
||||||
end
|
end
|
|
@ -4,6 +4,6 @@ xml.instruct! :xml, :version => "1.0"
|
||||||
|
|
||||||
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
|
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
|
||||||
@changesets.each do |changeset|
|
@changesets.each do |changeset|
|
||||||
osm << render(:partial => "changesets/changeset.builder", :locals => { :changeset => changeset })
|
osm << render(:partial => "api/changesets/changeset.builder", :locals => { :changeset => changeset })
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Add table
Add a link
Reference in a new issue