Class: Tests::LabAjaxController

Inherits:
ApplicationController show all
Defined in:
app/controllers/tests/lab_ajax_controller.rb

Instance Method Summary collapse

Methods included from SessionsHelper

#preferences_customer_type=, #preferences_customer_type?, #signed_in?, #signed_in_user, #store_location

Instance Method Details

#dataObject



13
14
15
# File 'app/controllers/tests/lab_ajax_controller.rb', line 13

def data
  render 'public/data.txt'
end

#json_multi_business_segmentsObject



17
18
19
20
21
# File 'app/controllers/tests/lab_ajax_controller.rb', line 17

def json_multi_business_segments
  res = []
  BusinessSegment.all.each {|b| res << {:key => b.id.to_s, :value => b.name} }
  render :json => res
end

#multiselectionObject



4
5
6
7
8
9
10
11
# File 'app/controllers/tests/lab_ajax_controller.rb', line 4

def multiselection
  @customer = Customer.new
  @person = CustomerPj.new
  @customer.person = @person
  @person.segments.build
  
  render 'multiselection'
end

#showObject



23
24
25
# File 'app/controllers/tests/lab_ajax_controller.rb', line 23

def show
  self.send params[:id]
end