Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is how the said problem got solved:
* Created a before_filter which checks if there is filtering being done, which then sorts the hash and returns records. * smart_filter helper is now a block helper, which means if the filtering is set up, it skips the content inside the block and shows the results. Happy. :)
- Loading branch information
1 parent
a08f3e0
commit 73f2cd4
Showing
6 changed files
with
43 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<table> | ||
<tr> | ||
<th>Name</th> | ||
<th>Address</th> | ||
<th>Zip Code</th> | ||
<th>Company</th> | ||
<th>Email</th> | ||
<th>Phone</th> | ||
<th>Domain</th> | ||
</tr> | ||
<% @filtered_results.each do |address_book| %> | ||
<tr> | ||
<td><%=h address_book.name %></td> | ||
<td><%=h address_book.address %></td> | ||
<td><%=h address_book.zipcode %></td> | ||
<td><%=h address_book.company %></td> | ||
<td><%=h address_book.email %></td> | ||
<td><%=h address_book.phone %></td> | ||
<td><%=h address_book.domain %></td> | ||
<td><%= link_to 'Show', address_book %></td> | ||
<td><%= link_to 'Edit', edit_address_book_path(address_book) %></td> | ||
<td><%= link_to 'Destroy', address_book, :confirm => 'Are you sure?', :method => :delete %></td> | ||
</tr> | ||
<% end %> | ||
</table> |
This file was deleted.
Oops, something went wrong.