Sha256: 74009c698908327d551a0e5a567b5895f53fde3fde3d4906dda25dee595c289a
Contents?: true
Size: 673 Bytes
Versions: 5
Compression:
Stored size: 673 Bytes
Contents
module InvoiceBar class SearchController < InvoiceBar::ApplicationController before_action :require_login def index @invoices = [] @receipts = [] @invoice_templates = [] @receipt_templates = [] @contacts = [] if params[:search] query = params[:search] @invoices = current_user.invoices.search_for(query) @receipts = current_user.receipts.search_for(query) @invoice_templates = current_user.invoice_templates.search_for(query) @receipt_templates = current_user.receipt_templates.search_for(query) @contacts = current_user.contacts.search_for(query) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems