]> git.openstreetmap.org Git - rails.git/commitdiff
Fix diary entry creation...
authorTom Hughes <tom@compton.nu>
Wed, 22 Aug 2007 00:19:58 +0000 (00:19 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Aug 2007 00:19:58 +0000 (00:19 +0000)
app/views/diary_entry/new.rhtml
app/views/message/new.rhtml

index c0ddaef2387268f7067e7aff96f664c4bff6c781..16974fad2f46525b2030651a75f9a98ef1ac6351 100644 (file)
@@ -1,6 +1,6 @@
 <%= error_messages_for 'diary_entry' %>
 
 <%= error_messages_for 'diary_entry' %>
 
-<% form_for :controller => 'diary_entry', :action => 'new' do |f| %>
+<% form_for :diary_entry do |f| %>
   <table>
     <tr valign="top">
       <th>Subject</th>
   <table>
     <tr valign="top">
       <th>Subject</th>
index b2d31b84285df8e01675f8243eae14dd16f61bd7..44ef84dfcb183c7195bd1ffd0bfe3170fa695766 100644 (file)
@@ -9,10 +9,21 @@
 
 <%= error_messages_for 'message' %>
 
 
 <%= error_messages_for 'message' %>
 
-<% form_tag :controller => 'message', :action => 'new' do %>
-subject: <%= text_field 'message', 'title' %><br>
-body: <%= text_area 'message', 'body' %><br>
-  <%= submit_tag 'Send' %>
+<% form_for :message do |f| %>
+  <table>
+    <tr valign="top">
+      <th>Subject</th>
+      <td><%= f.text_field :title, :size => 60 %></td>
+    </tr>
+    <tr valign="top">
+      <th>Body</th>
+      <td><%= f.text_area :body, :cols => 80 %></td>
+    </tr>
+    <tr>
+      <th></th>
+      <td><%= f.submit_tag 'Send' %></td>
+    </tr>
+  </table>
 <% end %>
 
 <br />
 <% end %>
 
 <br />