From 779d49f128301c894cf893600da2068d5662c323 Mon Sep 17 00:00:00 2001 From: bohung Date: Sat, 22 Oct 2022 16:23:42 +0800 Subject: [PATCH] Fix bug. --- app/controllers/announcements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 10b162c..3b301f2 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -46,7 +46,7 @@ class AnnouncementsController < ApplicationController page = @page || Page.where(url: params['url']).first @enable_search_flag = false @image_version = 'thumb' - if page.methods.include? 'select_option_items'.to_sym + if page.respond_to?(:select_option_items) ModuleApp.all.select{|tmp| tmp.key.to_s=='announcement'}.each do |modile_app| @show_option_items = modile_app.show_option_items rescue nil end