Class: BootstrapFeedbacker::RemarksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/bootstrap_feedbacker/remarks_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



10
11
12
13
14
15
16
17
18
# File 'app/controllers/bootstrap_feedbacker/remarks_controller.rb', line 10

def create
  @remark = Remark.new(remark_params)
  if @remark.save
    FeedbackMailer.feedback(@remark).deliver_now
    render_update(SETTINGS.modal_content_id, partial: 'thank_you')
  else
    render_update(SETTINGS.modal_content_id, partial: 'error', status: :unprocessable_entity)
  end
end

#newObject



5
6
7
8
# File 'app/controllers/bootstrap_feedbacker/remarks_controller.rb', line 5

def new
  @remark = BootstrapFeedbacker::Remark.new
  render_update(SETTINGS.modal_id, partial: 'new')
end