Modify strings in Rails?
Posted
by Daniel O'Connor
on Stack Overflow
See other posts from Stack Overflow
or by Daniel O'Connor
Published on 2010-04-14T15:15:21Z
Indexed on
2010/04/14
15:23 UTC
Read the original article
Hit count: 323
Hey everyone,
So I'm new to Rails (teaching myself as a senior project in high school), and I'm trying to figure out how to modify these strings.
Let's say someone writes the following string in a form: "you know you are a geek when"
How can I automatically change it to this: "You know you are a geek when..."?
I need Rails to check the case of the first letter and check for the three dots then modify the string as necessary. I've looked here, but I can't find anything that would work.
Thanks a lot!
© Stack Overflow or respective owner