module Comee module Core class SuppliersController < ApplicationController include Common def index super do Supplier.includes(:currency).all end end def filter suppliers = Supplier.includes(:currency).ransack(params[:q]).result render_content(suppliers) end private def model_params params.require(:payload).permit(:code, :name, :address, :locale, :currency_id) end end end end