asset_path in css erb files

This commit is contained in:
Devin Howard 2015-10-23 23:34:18 +08:00
parent 72e67c188a
commit 46dd54a1d7
5 changed files with 18 additions and 15 deletions

View file

@ -2352,15 +2352,15 @@ and it won't be important on password protected instances */
opacity: 0.7;
}
#chromeIcon {
background: url(/assets/browser_icons.png) no-repeat;
background: url(<%= asset_data_uri 'browser_icons.png' %>) no-repeat;
}
#fireFoxIcon {
background: url(/assets/browser_icons.png) no-repeat -105px 0;
background: url(<%= asset_data_uri 'browser_icons.png' %>) no-repeat -105px 0;
}
#safariIcon {
background: url(/assets/browser_icons.png) no-repeat -220px 0;
background: url(<%= asset_data_uri 'browser_icons.png' %>) no-repeat -220px 0;
}
#chromeIcon:hover{

View file

@ -740,7 +740,7 @@ font-family: 'din-regular', helvetica, sans-serif;
}
#linkremove {
background-image: url(/assets/remove.png);
background-image: url(<%= asset_data_uri 'remove.png' %>);
background-repeat: no-repeat;
background-position: center center;
width: 24px;
@ -1126,4 +1126,4 @@ font-family: 'din-regular', helvetica, sans-serif;
}
.mapperMetadata .metadataSynapses {
color: #DAB539;
}
}

View file

@ -1,20 +1,20 @@
@font-face {
font-family: 'din-medium';
src: url('/assets/Fonts/din.eot');
src: url('/assets/Fonts/din.eot?#iefix') format('embedded-opentype'),
url('/assets/Fonts/din.woff') format('woff'),
url('/assets/Fonts/din.ttf') format('truetype'),
url('/assets/Fonts/din.svg#din-medium') format('svg');
src: url(<%= asset_path 'Fonts/din.eot' %>);
src: url(<%= asset_path 'Fonts/din.eot?#iefix' %>) format('embedded-opentype'),
url(<%= asset_path 'Fonts/din.woff' %>) format('woff'),
url(<%= asset_path 'Fonts/din.ttf' %>) format('truetype'),
url(<%= asset_path 'Fonts/din.svg#din-medium' %>) format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'din-regular';
src: url('/assets/Fonts/din-reg.eot');
src: url('/assets/Fonts/din-reg.eot?#iefix') format('embedded-opentype'),
url('/assets/Fonts/din-reg.woff') format('woff'),
url('/assets/Fonts/din-reg.ttf') format('truetype'),
url('/assets/Fonts/din-reg.svg#din-reg') format('svg');
src: url(<%= asset_path 'Fonts/din-reg.eot' %>);
src: url(<%= asset_path 'Fonts/din-reg.eot?#iefix' %>) format('embedded-opentype'),
url(<%= asset_path 'Fonts/din-reg.woff' %>) format('woff'),
url(<%= asset_path 'Fonts/din-reg.ttf' %>) format('truetype'),
url(<%= asset_path 'Fonts/din-reg.svg#din-reg' %>) format('svg');
font-weight: normal;
font-style: normal;
}

View file

@ -21,6 +21,7 @@ class SynapsesController < ApplicationController
# POST /synapses
# POST /synapses.json
def create
binding.pry
@synapse = Synapse.new(synapse_params)
@synapse.update_attribute :desc, "" if @synapse.desc.nil?

View file

@ -8,6 +8,8 @@ class Synapse < ActiveRecord::Base
has_many :mappings, as: :mappable, dependent: :destroy
has_many :maps, :through => :mappings
validates :desc, length: { minimum: 0, allow_nil: false }
def user_name
self.user.name
end