diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 53df37a..f817f37 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -28,8 +28,8 @@ class PagesController < ApplicationController # if no message elsif params[:message].blank? flash[:alert] = t(:contact_us_no_message) - # else send email - else + # else send email if not a spambot + elsif params[:userlogin].blank? Mailer.contact_us(params[:email], params[:message]).deliver flash[:notice] = t(:contact_us_success) end diff --git a/app/views/pages/_contact_form.html.erb b/app/views/pages/_contact_form.html.erb index 839834a..c55bd7c 100644 --- a/app/views/pages/_contact_form.html.erb +++ b/app/views/pages/_contact_form.html.erb @@ -1,4 +1,6 @@ <%= form_tag({:controller => 'pages', :action => 'contact_us', :method => :post}, :class => 'form-horizontal') do %> + +