Skip to content

Instantly share code, notes, and snippets.

@AlexTalker
Created February 2, 2014 02:04
Show Gist options
  • Save AlexTalker/8761999 to your computer and use it in GitHub Desktop.
Save AlexTalker/8761999 to your computer and use it in GitHub Desktop.
unless params[:name].empty? and params[:msg].empty?
if params[:msg].length <= 140 and params[:name]. length <= 10
$msgs << [params[:name],params[:msg]]
"Send success!<a href=\"/\">Go to home!</a>"
else
"Error! Big message or name: #{params[:name]} say \"#{params[:msg]}\"<br/><a href=\"/\">Go to home!</a>}"
end
else
"Empty!<a href=\"/\">Go to home!</a>"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment