map view defaults to a home lat and lon

This commit is contained in:
Nick Black 2007-04-30 09:57:54 +00:00
parent f4e4fefaa1
commit 8bd09c0828
6 changed files with 52 additions and 3 deletions

View file

@ -3,6 +3,13 @@ class ApiController < ApplicationController
before_filter :authorize
after_filter :compress_output
helper :user
model :user
def authorize_web
@current_user = User.find_by_token(session[:token])
end
# The maximum area you're allowed to request, in square degrees
MAX_REQUEST_AREA = 0.25

View file

@ -162,7 +162,16 @@ class UserController < ApplicationController
def diary
@this_user = User.find_by_display_name(params[:display_name])
end
def contact_others(user_id, message_body)
@to = User.find_by_id(user_id)
@to.messages.new = body
if @to.save
flash[:notice] = Message sent
end
#Send a message to other users - maybe there's a rails messaging plugin
end
end