diff --git a/app/controllers/ajax_controller.rb b/app/controllers/ajax_controller.rb new file mode 100644 index 00000000..a93817b1 --- /dev/null +++ b/app/controllers/ajax_controller.rb @@ -0,0 +1,4 @@ +class AjaxController < ApplicationController + def ask + end +end diff --git a/app/helpers/ajax_helper.rb b/app/helpers/ajax_helper.rb new file mode 100644 index 00000000..3f1a4867 --- /dev/null +++ b/app/helpers/ajax_helper.rb @@ -0,0 +1,2 @@ +module AjaxHelper +end diff --git a/app/views/ajax/ask.json.jbuilder b/app/views/ajax/ask.json.jbuilder new file mode 100644 index 00000000..a027dbff --- /dev/null +++ b/app/views/ajax/ask.json.jbuilder @@ -0,0 +1,3 @@ +json.success @success +json.status @status +json.message @message \ No newline at end of file diff --git a/test/controllers/ajax_controller_test.rb b/test/controllers/ajax_controller_test.rb new file mode 100644 index 00000000..899107b0 --- /dev/null +++ b/test/controllers/ajax_controller_test.rb @@ -0,0 +1,9 @@ +require 'test_helper' + +class AjaxControllerTest < ActionController::TestCase + test "should get ask" do + get :ask + assert_response :success + end + +end diff --git a/test/helpers/ajax_helper_test.rb b/test/helpers/ajax_helper_test.rb new file mode 100644 index 00000000..c44c5ca4 --- /dev/null +++ b/test/helpers/ajax_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class AjaxHelperTest < ActionView::TestCase +end