fix error

This commit is contained in:
邱博亞 2022-09-01 10:42:50 +08:00
parent dc717408fe
commit 864ca46126
1 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
<% tmp = render_view %>
<% @params = @index_controller.instance_variable_get(:@params) rescue {}
@enable_search_flag = @index_controller.instance_variable_get(:@enable_search_flag) rescue false
%>
<% if @enable_search_flag %> <% if @enable_search_flag %>
<style type="text/css"> <style type="text/css">
#category_select_box{ #category_select_box{
@ -40,7 +45,7 @@
} }
</style> </style>
<form> <form>
<% cats = Array(page.categories) <% cats = Array(@page.categories)
if cats.include? 'all' if cats.include? 'all'
cats = ModuleApp.where(key: 'announcement').first.categories cats = ModuleApp.where(key: 'announcement').first.categories
else else
@ -65,4 +70,4 @@
</div> </div>
</form> </form>
<% end %> <% end %>
<%= render_view %> <%= tmp %>