Backend Refactoring
This commit is contained in:
parent
69e41250d1
commit
5926bbac12
11 changed files with 151 additions and 78 deletions
12
app/contexts/notes/create_context.rb
Normal file
12
app/contexts/notes/create_context.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
module Notes
|
||||
class CreateContext < BaseContext
|
||||
def execute
|
||||
note = project.notes.new(params[:note])
|
||||
note.author = current_user
|
||||
note.notify = true if params[:notify] == '1'
|
||||
note.notify_author = true if params[:notify_author] == '1'
|
||||
note.save
|
||||
note
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue