Sha256: e64b6ba22062429be297209fe838d7cb873efa76215e5ed8e584fb98a7d2513a
Contents?: true
Size: 626 Bytes
Versions: 3
Compression:
Stored size: 626 Bytes
Contents
class BookmarksController < ApplicationController respond_to :json def show respond_with Bookmark.find( params[ :id ] ) end def index # @stars = find_stars respond_with find_bookmarks # respond_to do |format| # format.json { respond_with @stars } # format.html # end end def create respond_with Bookmark.create( params[ :bookmark ] ) end def destroy respond_with Bookmark.find( params[ :id ] ).destroy end private def find_bookmarks user = User.find params[ :user_id ] if params[ :user_id ].present? Bookmark.find_all_by_user( user ) if user end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
your_platform-1.0.1 | app/controllers/bookmarks_controller.rb |
your_platform-1.0.0 | app/controllers/bookmarks_controller.rb |
your_platform-0.0.2 | app/controllers/bookmarks_controller.rb |