Sha256: 2afdc3506d4d2f159773a5a4a332b0a931a632c8abe84fa1e0d738a01a6f3edd

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

# * George Moschovitis  <gm@navel.gr>
# (c) 2004-2005 Navel, all rights reserved.
# $Id: controller.rb 1 2005-04-11 11:04:30Z gmosx $

require 'nitro/controller'

COUNTRIES = %w{ Greece USA England Germany Italy Canada France Japan Australia Holland }

class AjaxController < Nitro::Controller
	def hit
		puts "-----------------------------> hit #{request['val']}"
	end

	# ann :ajax => true, :params => :word
	def get_word
		word = request['word']
		word = COUNTRIES.find { |c| c =~ /^#{word}/ } || '-'
		@out << word 
	end
	# ajax :get_word, :params => :word
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.16.0 examples/ajax/controller.rb
nitro-0.17.0 examples/ajax/controller.rb