I dreated an app called employee using scaffolding. Changed the list view to incorporate a helper to display date as follows: <h1>Listing employees</h1> <table> <tr> <% for column in Employee.list_columns %> <th class = "even"><%= column.human_name %></th> <% end %> </tr> <% for employee in @employees %> <tr class = "<%= cycle("odd","even") %>"> <% for column in Employee.list_columns %> <!-- <td><%=h employee.send(column.name) %></td> CHANGED TO LINE BELOW --> <td><%=h format_date(column.name,employee) %></td> <% end %> <td><%= link_to ''Show'', :action => ''show'', :id => employee %></td> <td><%= link_to ''Edit'', :action => ''edit'', :id => employee %></td> <td><%= link_to ''Destroy'', { :action => ''destroy'', :id => employee }, :confirm => ''Are you sure?'', :method =>$ </tr> <% end %> </table> <%= link_to ''Previous page'', { :page => @employee_pages.current.previous } if @employee_pages.current.previous %> <%= link_to ''Next page'', { :page => @employee_pages.current.next } if @employee_pages.current.next %> <br /> <%= link_to ''New employee'', :action => ''new'' %> The helper is in application_helper.rb as follows: # Methods added to this helper will be available to all templates in the application. module ApplicationHelper def format_date(col_name,date_object) if col_name.include? "date" date_object.send(col_name).strftime(''%m/%d/%Y'') else date_object.send(col_name) end end end Here''s the rub, I want to use the helper in the show view (something like the following): <% for column in Employee.content_columns %> <p> <!-- <b><%= column.human_name %>:</b> <%= @employee.send(column.name) %> --> <b><%= column.human_name %>:</b> <%= format_date(column.name, @employee) %> </p> <% end %> <%= link_to ''Edit'', :action => ''edit'', :id => @employee %> | <%= link_to ''Back'', :action => ''list'' %> But, I get this error: You have a nil object when you didn''t expect it! The error occurred while evaluating nil.strftime We''ve tried eveything that we can think of without success. What gives? I appreciate your help and any suggestions regarding my problem or suggestions regarding coding that you would care to make. Learning to think the way in that Rails (and Ruby) work is certainly turning into an experience. Thanks again, rB Randy -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---