app/controllers/refinery/inquiries/admin/inquiries_controller.rb in refinerycms-inquiries-2.1.0 vs app/controllers/refinery/inquiries/admin/inquiries_controller.rb in refinerycms-inquiries-3.0.0

- old
+ new

@@ -7,13 +7,13 @@ :title_attribute => "name", :order => "created_at DESC" helper_method :group_by_date - before_filter :find_all_ham, :only => [:index] - before_filter :find_all_spam, :only => [:spam] - before_filter :get_spam_count, :only => [:index, :spam] + before_action :find_all_ham, :only => [:index] + before_action :find_all_spam, :only => [:spam] + before_action :get_spam_count, :only => [:index, :spam] def index @inquiries = @inquiries.with_query(params[:search]) if searching? @inquiries = @inquiries.page(params[:page]) end @@ -40,9 +40,15 @@ @inquiries = Refinery::Inquiries::Inquiry.spam end def get_spam_count @spam_count = Refinery::Inquiries::Inquiry.where(:spam => true).count + end + + private + + def inquiry_params + params.require(:inquiry).permit(:name, :phone, :message, :email) end end end end