2012-09-23 02:39:12 +00:00
|
|
|
class MainController < ApplicationController
|
|
|
|
|
2012-10-08 05:45:44 +00:00
|
|
|
before_filter :require_user, only: [:userobjects]
|
2012-09-23 02:39:12 +00:00
|
|
|
respond_to :html, :js, :json
|
|
|
|
|
|
|
|
def home
|
|
|
|
@current_user = current_user
|
|
|
|
|
|
|
|
@all = Group.all + Person.all + Item.all
|
|
|
|
|
|
|
|
respond_with(@all)
|
|
|
|
end
|
2012-10-08 05:45:44 +00:00
|
|
|
|
|
|
|
def userobjects
|
|
|
|
@user = current_user
|
|
|
|
|
|
|
|
@all = @user.groups + @user.people + @user.items
|
|
|
|
|
|
|
|
respond_with(@all)
|
|
|
|
end
|
2012-09-23 02:39:12 +00:00
|
|
|
|
|
|
|
end
|