fixing bugs

This commit is contained in:
dinedine 2011-01-29 13:05:42 +01:00
parent c9e1e3278b
commit a525e4ccd5
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ class ThemeAsset
def plain_text
if RUBY_VERSION =~ /1\.9/
@plain_text ||= self.source.read.force_encoding('UTF-8')
@plain_text ||= (self.source.read.force_encoding('UTF-8') rescue nil)
else
@plain_text ||= self.source.read
end

View File

@ -6,7 +6,7 @@
= f.input :name
= f.input :source
- unless @asset.custom_fields.empty?
- unless @asset.custom_fields.blank?
= render 'admin/custom_fields/custom_form', :form => f, :title => :other_fields, :parent => @asset_collection
- if @asset.image? && @asset.valid?