app/controllers/export_email_controller.rb in umlaut-3.3.1 vs app/controllers/export_email_controller.rb in umlaut-4.0.0.beta1
- old
+ new
@@ -1,13 +1,11 @@
class ExportEmailController < UmlautController
before_filter :load_objects
layout :search_layout_except_xhr
- def load_objects
- @svc_response = ServiceResponse.find(params[:id])
- @user_request = @svc_response.request if @svc_response
+ def email
end
def send_email
@email = params[:email]
@fulltexts = @user_request.get_service_type('fulltext', { :refresh=>true })
@@ -18,10 +16,13 @@
flash[:alert] = email_validation_error
render :email and return
end
end
+ def txt
+ end
+
def send_txt
@number = params[:number]
# Remove any punctuation or spaces etc
@number.gsub!(/[^\d]/, '') if @number
@provider = params[:provider]
@@ -33,10 +34,16 @@
flash[:alert] = txt_validation_error
render :txt and return
end
end
- private
+ protected
+
+ def load_objects
+ @svc_response = ServiceResponse.find(params[:id])
+ @user_request = @svc_response.request if @svc_response
+ end
+
def valid_txt_number?
((not @number.blank?) && @number.length == 10)
end
def valid_txt_holding?
\ No newline at end of file