I'm have some difficulties here, I am unable to successfully call a method which belongs to a ProjectPage
model in the ProjectPage
controller.
I have in my ProjectPage
controller:
def index
@searches = Project.published.financed
@project_pages = form_search(params)
end
And in my ProjectPage
model:
def form_search(searches)
searches = searches.where('amount > ?', params[:price_min]) if check_params(params[:price_min])
@project_pages = ProjectPage.where(:project_id => searches.pluck(:'projects.id'))
end
However, I am unable to successfully call the form_search
method.