Displaying 1 result from an estimated 1 matches for "facilities_hotel".
Did you mean:
facilities_hotels
2012 Apr 23
1
Searching and returning arrays
...</div>
<% end %>
<%= submit_tag "Search", :name => nil%>
(...)
<% @hotels.each do |hotel|%>
<h2> <%= link_to hotel.name, hotel %> </h2>
My hotels and facilities are a has_many_and_belongs_to relationship with
everything working. The facilities_hotels table is created with the
facility_id and hotel_id collums, and the facilities table has for
columns a facility_id and description(which is for e.g. pool, 24hroom
service etc)
The issue is in my model:
def self.search(params)
if params
arel = where(''#searches for names/...