Created
November 24, 2011 16:11
-
-
Save smooki/1391704 to your computer and use it in GitHub Desktop.
The action 'add_comment' could not be found for KittiesController ....
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
class KittiesController < ApplicationController | |
helper :comment | |
... | |
end | |
module CommentHelper | |
def add_comment | |
new_comment = Comment.build_from(slef, current_user.id, params[:body]) | |
new_comment.save! | |
redirect_to event_kitty_path(params[:event_id], self) | |
end | |
end | |
<% form_tag add_comment_event_kitty_url(@event, @kitty), :method => :post do %> | |
<%= text_area_tag :body %> | |
<div class="submit"> | |
<%= submit_tag t(:post_comment) %> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment