data no same.

In this action you're saying if @n render new which will always render your new view in the controller namespace. Then your else is @admin.save

That's why it's not functioning. Depending on what you are trying to do I'm assuming you want if @admin.save then a render or redirect afterwards. Your else condition should be render new.

If you can provide some more context and how this should behave I'll be happy to help further.

Hi,

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).

What you're looking for is probably uniqueness check, either at model
level (validates_uniqueness_of) and/or database (unique index).

if @n

Here, @n will always be true because you have:

@n = Box.where(name: params[:name])

which always return trueish value even when there's no result. You need
either call `take` or use `find_by` instead or do it properly as I wrote
above.

#i am using hp,i hope you understand that has give.
(:slight_smile: my english less)

Try learning English (for example, using https://id.duolingo.com/ ).

You really should follow my previous advice to work right through
railstutorial.org, including doing all the exercises. That way you will
learn the basics of rails and not need to ask for help with simple problems.

Colin