Update layout.erb

Added a submitted variable in a closure to prevent duplicate submissions.
Merge pull request #4 from perrupa/patch-1

Update layout.erb