Define the code

With this code we can print errors. As we know whenever we write ruby in HTML with mote you must place a sign % before writing the code:

Line 1
First we are defined the session with a hash params and this params with a hash session.

Line 3 to 7:
If session has a hash with the key: success it will print the value. To print in mote you need to use double {} session.delete(:success)
Do the same for the session error (Line 9 to 13)

Define my layout

Write the message

Now to work, we need to write the message that you want to print.
We are execute the code on line 13 and line 29.

Here we are execute the code in the line 14