Class: Api::V1::BookmarksController

Inherits:
BaseController show all
Defined in:
app/controllers/api/v1/bookmarks_controller.rb

Instance Method Summary collapse

Methods included from Api::Version1

#api_version

Methods inherited from BaseController

#get_resource, #resource_class, #resource_name, #resource_scope

Methods included from Foreman::ThreadSession::Cleaner

#clear_thread, included

Instance Method Details

#createObject


28
29
30
31
# File 'app/controllers/api/v1/bookmarks_controller.rb', line 28

def create
  @bookmark = Bookmark.new(params[:bookmark])
  process_response @bookmark.save
end

#destroyObject


49
50
51
# File 'app/controllers/api/v1/bookmarks_controller.rb', line 49

def destroy
  process_response @bookmark.destroy
end

#indexObject


10
11
12
# File 'app/controllers/api/v1/bookmarks_controller.rb', line 10

def index
  @bookmarks = Bookmark.paginate(paginate_options)
end

#showObject


17
18
# File 'app/controllers/api/v1/bookmarks_controller.rb', line 17

def show
end

#updateObject


42
43
44
# File 'app/controllers/api/v1/bookmarks_controller.rb', line 42

def update
  process_response @bookmark.update_attributes(params[:bookmark])
end