asset_path
This commit is contained in:
parent
2505ce36a5
commit
cef83e1f3d
3 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ module MapsHelper
|
|||
map['rtype'] = "map"
|
||||
|
||||
contributorTip = ''
|
||||
firstContributorImage = '/assets/user.png'
|
||||
firstContributorImage = asset_path('user.png')
|
||||
if m.contributors.count > 0
|
||||
firstContributorImage = m.contributors[0].image.url(:thirtytwo)
|
||||
m.contributors.each_with_index do |c, index|
|
||||
|
|
|
@ -12,7 +12,7 @@ class Map < ActiveRecord::Base
|
|||
:thumb => ['188x126#', :png]
|
||||
#:full => ['940x630#', :png]
|
||||
},
|
||||
:default_url => "/assets/missing-map.png"
|
||||
:default_url => asset_path('missing-map.png')
|
||||
|
||||
# Validate the attached image is image/jpg, image/png, etc
|
||||
validates_attachment_content_type :screenshot, :content_type => /\Aimage\/.*\Z/
|
||||
|
|
|
@ -35,7 +35,7 @@ class User < ActiveRecord::Base
|
|||
:ninetysix => ['96x96#', :png],
|
||||
:onetwentyeight => ['128x128#', :png]
|
||||
},
|
||||
:default_url => "/assets/user.png"
|
||||
:default_url => asset_path('user.png')
|
||||
|
||||
# Validate the attached image is image/jpg, image/png, etc
|
||||
validates_attachment_content_type :image, :content_type => /\Aimage\/.*\Z/
|
||||
|
|
Loading…
Reference in a new issue