I'm assuming you want if
@admin.save then a render or
redirect afterwards.
#correct,i assuming here i want input data to db with defference name.
#means:if i have field name with value "cow" on db, i not want not have two "cow" name on table Box,because that i use @n as checker,are there name with 'cow'.'quotes'(i want make sign up with manual but here i assuming def create as login for my ask today).
Truely i have 2 controller
1.blog_
2.user_
for this action i assuming that "def create" on user_ ,than back to my ask.
if @n
render 'new' #'new' method on user_
#why i using 'render'because for flash[:error] ex:sorry that name... & if not use than flash no function
else
@admin.save
redirect_to blog_index_path #this routes back to index
#why,because same i using flash
end
---
Your else
condition should be render new.
#i war tried,but same too.
(:-) my english less)
--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2d59ca45-9aee-4698-a1ff-5bf25e5b486a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment