metamaps--metamaps/app/controllers/main_controller.rb
2012-10-17 20:51:54 -04:00

30 lines
433 B
Ruby

class MainController < ApplicationController
before_filter :require_user, only: [:userobjects]
respond_to :html, :js, :json
def home
@current_user = current_user
@all = Item.all
respond_with(@all)
end
def userobjects
@user = current_user
@all = @user.items
respond_with(@all)
end
def usersynapses
@user = current_user
@all = @user.synapses
respond_with(@all)
end
end