2011-03-18 02:33:20 +00:00
|
|
|
class ContentsController < ApplicationController
|
2011-03-17 18:46:06 +00:00
|
|
|
def index
|
|
|
|
@hydrant = Hydrant.find_by_id(params[:hydrant_id])
|
|
|
|
if @hydrant.adopted?
|
|
|
|
if user_signed_in? && current_user.id == @hydrant.user_id
|
|
|
|
render(:partial => "thank_you")
|
|
|
|
else
|
|
|
|
render(:partial => "user_profile")
|
|
|
|
end
|
|
|
|
else
|
|
|
|
if user_signed_in?
|
|
|
|
render(:partial => "adoption_form")
|
|
|
|
else
|
|
|
|
render(:partial => "combo_form")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|