Skip to content

Instantly share code, notes, and snippets.

Avatar

Russell Quinn russellquinn

View GitHub Profile
View gist:ac55b636a39e1b43694e
For example, to add search-by-email to a model called User
in views/casein/users/index.html.erb
<%= content_for :sidebar do %>
<li>
<%= form_tag casein_users_path, {:method => 'get'} do %>
<div class='form-group'>
<small><%= label_tag "search", "Search by email", {:class => "control-label"} %></small>
<%= text_field_tag "search", params[:search], {:class => "form-control", :size => "100%"} %>