diff --git a/app/controllers/admin/testings_controller.rb b/app/controllers/admin/testings_controller.rb index 921bef0..667bf96 100644 --- a/app/controllers/admin/testings_controller.rb +++ b/app/controllers/admin/testings_controller.rb @@ -12,6 +12,10 @@ class Admin::TestingsController < OrbitAdminController @qas = search_data(@qas,[:title]).page(params[:page]).per(10) render :partial => "index" if request.xhr? end + def hello + @trash = '123' + render :partial => "hello" if request.xhr? + end def new @qa = Qa.new @tags = @module_app.tags @@ -80,3 +84,9 @@ class Admin::TestingsController < OrbitAdminController params.require(:qa).permit! end end +module ClassMethods + def with_trash(trash) + trash = [trash].flatten + self.any_of(trash.map{|s| {s.to_sym=>true}}) + end +end diff --git a/app/views/admin/testings/hello.html.erb b/app/views/admin/testings/hello.html.erb index cb1ff21..a13b1e6 100644 --- a/app/views/admin/testings/hello.html.erb +++ b/app/views/admin/testings/hello.html.erb @@ -1,2 +1,4 @@