or, possibly doing something like this.....
<% open = '   '; close = '  '; open[0]=60; open[1]=37; open[2]=61;  
close[0] = 37, close[1] = 62 %>
article_001:
  body_summary: <%= open %>irb embedded ruby here<%= close %>

or something syntactically similar. maybe defining open and close  
somewhere else?
On 23 Sep 2009, at 13:32, Matt Kydd wrote:

>
> Can you store it in a text file and include that in the YAML?
>
> I've used this before:
>
> article_001:
>  body_summary: "<%=
> File.open("#{RAILS_ROOT}/test/fixtures/article_bodies/ 
> _test_article_body_001.txt",'r').read
> %>"
>
>
> 2009/9/23 Paul Robinson <[email protected]>:
>> Hi all,
>> We have a bit of a strange database column in one of our projects  
>> where we
>> need to store some ERb. Yes, this might not be the most sensible  
>> idea but,
>> it's the simplest given what we're having to do in this particular  
>> context.
>> When we shove something into a fixture with some ERb, Rails does the
>> wonderful thing of parsing the Ruby. In some contexts, this is  
>> awfully
>> useful. In this one, it's just awful.
>> Spent half an hour this morning digging around and can't see where  
>> I say
>> "Oi! Don't do that here please!". Any ideas? Am I being dumb? (Yes,  
>> I am
>> being dumb for storing ERb in the DB, I know that).
>> --
>> Paul Robinson
>> http://vagueware.com :: [email protected] :: +44 (0) 7740 465746
>> Vagueware Limited is registered in England/Wales, number 05700421
>> Registered Office: 3 Tivoli Place, Ilkley, W. Yorkshire, LS29 8SU
>> Correspondence: 13 Crossland Road, Manchester, M21 9DU
>>
>>>
>>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to