lib/quickapps_feedback.rb in quickapps_feedback-0.1.3 vs lib/quickapps_feedback.rb in quickapps_feedback-0.1.4

- old
+ new

@@ -4,21 +4,18 @@ require 'sinatra/base' require 'sinatra/flash' module QuickappsFeedback class App < Sinatra::Base - register Sinatra::Flash - get '/feedback' do erb :index end post '/feedback' do feedback = Feedback.new(request.env['HTTP_X_MXIT_USERID_R'] || session[:uid], params[:full_message],params[:support_type]) SendFeedbackToUservoice.new.perform(feedback) - flash('feedback_flash')[:notice] = 'thank you for your feedback' - redirect to('/feedback') + redirect to('/feedback?success=true') end get '/feedback/new' do erb :new, locals: {support_type: params[:type]} end