This commit is contained in:
chiu committed 2019-08-23 15:26:49 +08:00
1 parent 1080aab583
commit caa88092ab
3 files changed
+12 -1

No files matched your search

@@ -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