Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 145e7ddb5c
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (15 sloc) 0.406 kB
class CommentsController < ApplicationController
before_filter :require_user
def create
@comment = Comment.new(params[:comment])
@instrument = Instrument.find(params[:instrument_id])
@comment.user = current_user
@comment.instrument = @instrument
if @comment.save
flash[:notice] = "saved"
redirect_to @instrument
else
redirect_to @instrument
end
end
end
Jump to Line
Something went wrong with that request. Please try again.