foreman/app/controllers/api/v1/bookmarks_controller.rb @ d00e1bee
3d6d01c7 | Ohad Levy | module Api
|
|
module V1
|
|||
class BookmarksController < BaseController
|
|||
before_filter :find_by_name, :only => [:show, :update, :destroy]
|
|||
def index
|
|||
d00e1bee | Tomas Strachota | @bookmarks = Bookmark.all
|
|
3d6d01c7 | Ohad Levy | end
|
|
def show
|
|||
end
|
|||
def create
|
|||
d00e1bee | Tomas Strachota | @bookmark = Bookmark.create(params[:bookmark])
|
|
3d6d01c7 | Ohad Levy | end
|
|
def update
|
|||
d00e1bee | Tomas Strachota | @bookmark.update_attributes(params[:bookmark])
|
|
3d6d01c7 | Ohad Levy | end
|
|
def destroy
|
|||
respond_with @bookmark.destroy
|
|||
end
|
|||
end
|
|||
end
|
|||
end
|