-
-
Save anonymous/90f1dd8f54e6eec6ce65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/blog/templates/posts/index.html.ep b/examples/blog/templates/posts/index.html.ep | |
index fa91f67..1b7d52e 100644 | |
--- a/examples/blog/templates/posts/index.html.ep | |
+++ b/examples/blog/templates/posts/index.html.ep | |
@@ -5,4 +5,6 @@ | |
%= $post->{body} | |
</p> | |
% } | |
-%= button_to 'New post' => 'create_post' | |
+%= form_for create_post => begin | |
+ %= submit_button 'New post' | |
+% end | |
diff --git a/examples/blog/templates/posts/show.html.ep b/examples/blog/templates/posts/show.html.ep | |
index 12c1842..595ee8d 100644 | |
--- a/examples/blog/templates/posts/show.html.ep | |
+++ b/examples/blog/templates/posts/show.html.ep | |
@@ -1,5 +1,9 @@ | |
% layout 'blog', title => $post->{title}; | |
<h2><%= $post->{title} %></h2> | |
<p><%= $post->{body} %></p> | |
-%= button_to 'Edit post' => edit_post => {id => $post->{id}} | |
-%= button_to 'Remove post' => remove_post => {id => $post->{id}} | |
+%= form_for edit_post => {id => $post->{id}} => begin | |
+ %= submit_button 'Edit post' | |
+% end | |
+%= form_for remove_post => {id => $post->{id}} => begin | |
+ %= submit_button 'Remove post' | |
+% end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment