Rails actions based on number of characters -


how if / else statement in rails based on number of character (ex: 100)? sample code appreciated!

maybe helps?

phrase = "hello world" if phrase.length > 100   //do somthing end 

this execute if your phrase string longer 100 characters.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -