From: Thufir Date: 2008-02-10T20:21:53+09:00 Subject: getting human-readable results How do I get human readable results instead of: Login: 0123 # # # Edit | Back Is there some ruby magic which I can put in the model? I'm hoping that the solution isn't terribly complex. Is there something which I can do from the console to figure out what's going wrong? thufir@arrakis ~/goodfellow-tool $ thufir@arrakis ~/goodfellow-tool $ thufir@arrakis ~/goodfellow-tool $ cat app/models/login.rb class Login < ActiveRecord::Base belongs_to :employee has_many :calls def report reports = [] calls.each do |call| puts login + "\t" + call.created_at.to_s + "\t" call.comment end end end thufir@arrakis ~/goodfellow-tool $ thufir@arrakis ~/goodfellow-tool $ cat app/views/logins/show.rhtml <% for column in Login.content_columns %>

<%= column.human_name %>: <%=h @login.send(column.name) %>

<% end %>

<% @login.report.each do |report| %> <%= h report %> <% end %>

<%= link_to 'Edit', :action => 'edit', :id => @login %> | <%= link_to 'Back', :action => 'list' %> thufir@arrakis ~/goodfellow-tool $ thanks, Thufir