class SignsController < ApplicationController

  def index
    location = params["variable"]
    @closest_parks = Park.within(1,:units=>:kms,:origin=>location)
  end

  def create
    @sign = Sign.new(sign_params)
    if @sign.save
      redirect_to root_path
    else
      redirect_to root_path
    end
  end

  def new
    @sign = Sign.new
  end

  private

  def sign_params
    params.require(:sign).permit(:name, :location, :borough, :content, :propID)
  end

end
