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

View File

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

View File

@ -1,2 +1,4 @@
<h1>Hello Worlds</h1>
<h2>HOLA</h2>
<%= render 'hello' %>
<%= @trash %>

View File

@ -1,5 +1,4 @@
<%= render_filter @filter_fields, "index_table" %>
<%= puts ['index',@filter_fields].inspect %>
<div id="index_table">
<%= render 'index'%>
</div>