show image using absolute path rails -
for ruby on rails want use
<img src =../../../photo/1.png >
to show images stored outside app folder. use , use .. point out image it , not work。 use win7, there me ?
i have mvc named "showcase" generated scaffold, , wanna have same showcase in 2 apps. in app1: showcase (where wanna share images)model: house image name.
class showcase < activerecord::base attr_accessible :house,:sequence has_attached_file :house, :whiny => false, :styles => { :large => "350x300>", :medium => "120x100>", :thumb => "50x50>"} end
then images uploaded in folder: public/systems/showcases/houses/000/000/0001/1.png
in app2. create showcase model migration. , use activeresources share database between app1 , app2. app2 can not configure paperclip type.
class showcase < activeresource::base self.site = "http://localhost:3000" end
how can in app2, call images uploaded app1.
if trying share images between applications, , uploads , not static assets create systems folder somewhere else, make system folders in each app symlink share folder. way not having crazy url paths, , both can asses it, , wont end dupes or mismatches.
Comments
Post a Comment