Sha256: b6dcd3a3d71e21e24e8fea0c2c547fd7b0075888cf81b59683fec1aebc3652c7
Contents?: true
Size: 545 Bytes
Versions: 5
Compression:
Stored size: 545 Bytes
Contents
class LinkController < ApplicationController before_filter :auth_required def index list render_action 'list' end def list @links = current_user.links || [] end def new @link = current_user.links.build if @request.post? @link.attributes = @params['link'] if @link.save flash['notice'] = "Link was successfully saved." redirect_to_link return end end end def destroy current_user.links.find(@params['id']).destroy rescue nil redirect_to_link end end
Version data entries
5 entries across 5 versions & 1 rubygems