# -*- encoding : utf-8 -*-
class StickiesController < ApplicationController
  respond_to :html, :json

  def index
    if params[:latitude] && params[:longitude]
      respond_with Sticky.near([params[:latitude], params[:longitude]], 0.002, :units => :km)
    else
      respond_with Sticky.all
    end
  end

  def create
  	respond_with Sticky.create(sticky_params)
  end

  def sticky_params
  	params.require(:sticky).permit(:title, :longitude, :latitude, :pattern, :radius, :note)
  end
end

# -*- encoding : utf-8 -*-
class StickiesController < ApplicationController
  respond_to :html, :json

  def index
    if params[:latitude] && params[:longitude]
      respond_with Sticky.near([params[:latitude], params[:longitude]], 0.005, :units => :km)
    else
      respond_with Sticky.all
    end
  end

  def create
  	respond_with Sticky.create(sticky_params)
  end

  def sticky_params
  	params.require(:sticky).permit(:title, :longitude, :latitude, :pattern, :radius, :note)
  end
end

Revert "change radius to 2"
Revert "change radius to 2"

This reverts commit 90315b47397cae283fb38b30692096b0bc433740.
