2007年11月13日 星期二

h() , Time.now() and link_to()

h() method prevents the special characters in the e-mail address or ...

Time.now()
@time = Time.now
<%= @time %>

link_to()
<%= link_to "Goodbye", :action => "goodbye" %>

---------------------------------------------------------------------------
In controller:
@files = Dir.glob('*' )

In view:
<% for file in @files %>
 file name is <%= file %>
<% end %>

沒有留言: