On 19 December 2013 20:00, One Two <[email protected]> wrote:
> I am trying to create blogging software using Ruby on Rails. I have a
> CommentsController class and an EntriesController class. The file
> app/views/entries/show.html.erb contains the code "<%= render
> 'comments/form' %>", which displays a form on the page for an individual
> entry to add a comment on that entry. When a user submits a comment but
> does something invalid like submit a blank comment or a blank name I
> want the user to be redirected back to the entry's page with the comment
> filled out with whatever data was filled in. I tried the following code
> inside my "create" function in the comments_controller.rb file:

I suggest that, as a beginner, you work right through a good tutorial
such as railstutorial.org, which is free to use online.  That will
show you the basics of Rails, including how to solve your problem.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvLyWXJQHhxJ1%2BNa0Ee8DzDv5TtEEUfX%2Bo%2BDhjg1R6v4w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to