trabajo-afectivo/app/controllers/recent_viewed_controller.rb

29 lines
516 B
Ruby
Raw Normal View History

2014-02-03 19:24:49 +00:00
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class RecentViewedController < ApplicationController
before_filter :authentication_check
=begin
Resource:
GET /api/v1/recent_viewed
Response:
{
...
}
Test:
curl http://localhost/api/v1/recent_viewed.json -v -u #{login}:#{password} -H "Content-Type: application/json" -X GET
=end
def recent_viewed
recent_viewed = RecentView.list_fulldata( current_user, 10 )
# return result
2012-07-23 22:22:23 +00:00
render :json => recent_viewed
end
end