Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #print_controller.rb
- def show
- @reports = Report.find_by_some_attribute(...
- #show.html.erb
- <%- @reports.each do |report| -%>
- <%= report.created_at -%>
- <%- end -%>
- XYZ.all.each do |xyz|
- some(xyz)
- end
- Report.find_by_created_at("2013-11-12 14:43:44.11824")
- def show
- @reports = Report.where(:attribute => value)
- end
- it will get the all records basic on that value
- <h1>views/abc/show.html.erb</h1>
- <% @reports.each do |report| %>
- <%= report.attribute_name %>
- <%end%>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement