I have about 500 small ( <1kb) .png files I put into /images/icons. In
my Origins table, I have a column called 'graphic' which contains the
filename (sans path) to one of these 500 small png's (e.g.
"fire.PNG").
I'm trying to do two separate things here, but I am getting really
twisted up on the syntax. First, In the List view, I'd like to display
the thumbnail image. I understand that I need to amend the helper to
that Model, and I do so as follows:
module OriginHelper
def graphic_form_column (record, input_name)
s = %Q{"images/icons/#{record.graphic}"}
# I dont know about the syntax of this (so I rem it out, to view
the string itself):
# img src = s
# below, to make sure the string s is correct:
render :text => s
end
end
As you can see, the img src line is causing an issue (I cannot seem to
find out here or in the Wiki how to get the feild to be recognised as
coming from a graphic image on the server) Furthermore, I think
amending the Helper only alters the output in the Show or Edit views
(which is the second issue I want to work on, and that is to have a
combobox in the edit view that shows all 500 graphics, with the
selected on showing, and allow the user to change that on the fly).
For now, I cannot even get the selected image to display in the List
view as I cannot find the proper syntax for this. Can someone show me
what the syntax should be for this, or how to find it in the docs?
Thank you, Janna
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---