On Fri, Jan 16, 2009 at 8:32 AM, naevity <[email protected]> wrote:
>
> Is this even possible? I've got a ruby expression stored in a
> database, it's the code to run a plugin since I was having trouble
> passing variables stored in the database.
>
> When I try to call the code, it either outputs it as text, or doesn't
> display it at all. It's supposed to generate an image and display it.
>
> right now the code is stored in the database as:
>
> <%= barcode TEST1234, :encoding_format => Gbarcode::BARCODE_128 %>
>
> and in the View, I have this:
>
> <%= code.upc %>    (where upc is the column name in the database)
>
> When I do this, nothing outputs in the view, but if I view the source,
> I can see the ruby expression.
>
> If I change the code stored in the database to this:
> barcode TEST1234, :encoding_format => Gbarcode::BARCODE_128
>
> This just displays the code on the webpage, which I would expect it
> to.
>
> am I doing something wrong or is this not possible?

This smells funny... so I wanted to ask for more information. How is
the ruby code going to be added into the database? Would users be
inputting ruby code somehow?

Robby

-- 
Robby Russell
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails

http://www.planetargon.com/
http://www.robbyonrails.com/
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to