Sha256: ea0a23e9dd2ee49e7cbe5ff133fd1fc736d06afcf6895b4f244292c0db581e68
Contents?: true
Size: 414 Bytes
Versions: 1
Compression:
Stored size: 414 Bytes
Contents
require_dependency "watchtower/application_controller" module Watchtower class NotesController < ApplicationController def create @contact = Contact.find(params[:contact_id]) @note = @contact.notes.build(params[:note]) if @note.save redirect_to @contact, notice: "Note added." else redirect_to @contact, notice: "Note could not be added." end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watchtower-0.0.1 | app/controllers/watchtower/notes_controller.rb |