[openstreetmap-website] Changeset discussion feature (#772)

Łukasz Gurdek notifications at github.com
Sat Aug 2 16:36:12 UTC 2014


> @@ -305,6 +312,146 @@ def feed
>      list
>    end
>  
> +  ##
> +  # Add a comment to a changeset
> +  def comment
> +    # Check the arguments are sane
> +    raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
> +    raise OSM::APIBadUserInput.new("No text was given") if params[:text].blank?
> +
> +    # Extract the arguments
> +    id = params[:id].to_i
> +    body = params[:text]
> +
> +    # Find the changeset and check it is valid
> +    @changeset = Changeset.find(id)
> +    raise OSM::APINotFoundError unless @changeset

I removed all these not found exceptions calls from the pull request.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/772/files#r15729923
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20140802/9a20308c/attachment.html>


More information about the rails-dev mailing list