diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 3ea6cb77..f7e9708a 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -10,10 +10,16 @@ class MainController < ApplicationController # home page def home - @maps = Map.find_all_by_featured(true).shuffle! - @maps = @maps.slice(0,3) + @current = current_user - respond_with(@maps) + if !authenticated? + @maps = Map.find_all_by_featured(true).shuffle! + @maps = @maps.slice(0,3) + elsif authenticated? + @maps = Map.order("updated_at DESC").limit(3) + end + + respond_with(@maps, @current) end # /request diff --git a/app/views/main/home.html.erb b/app/views/main/home.html.erb index ef664bb9..53f3e1da 100644 --- a/app/views/main/home.html.erb +++ b/app/views/main/home.html.erb @@ -15,31 +15,48 @@
- Request Invite - Learn More -