Expression Interpolation from input "template string"?

Discussion in 'Ruby' started by Peter Fitzgibbons, Oct 18, 2005.

  1. Hello all,

    I have a set of "template messages" from a database table that I want
    to go something like this :

    "Hello, today is #{msgDate}"

    What I don't know is how to get the interpolation to work when the
    string is read from teh database as if :

    x =3D 'Hello, today is #{msgDate}' <<=3D=3D note the single quotes

    Have any ideas ?

    Thanks.

    Peter Fitzgibbons
     
    Peter Fitzgibbons, Oct 18, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    6,077
    Researcher_123
    Oct 7, 2011
  2. Mat W
    Replies:
    3
    Views:
    438
    Skeleton Man
    May 21, 2004
  3. \Rob\
    Replies:
    8
    Views:
    661
    Daniel Kirsch
    Feb 24, 2006
  4. Kun
    Replies:
    2
    Views:
    425
    John J. Lee
    Apr 12, 2006
  5. Josef Moellers
    Replies:
    8
    Views:
    89
    Florian Kaufmann
    Jan 23, 2008
Loading...

Share This Page