Fix bug when editing a page, the theme wasn't including blank

This commit is contained in:
chris2tof committed 2011-09-13 14:03:03 +08:00
1 parent 4db88282a1
commit f2e3cb00db
5 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ class Layout < DesignFile
after_save :parse_layout
def content
self.file.read.force_encoding("UTF-8")
self.file.read.force_encoding("UTF-8") rescue ''
end
def self.exist_one?
+1 -1
View File
@@ -6,6 +6,6 @@ class Purchase
field :title
field :author
field :intro
field :downloaded
field :downloaded, :type => Boolean
end
+1 -1
View File
@@ -25,7 +25,7 @@
<p>
<%= t('admin.theme') %>
<% if @design %>
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }%>
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
<% else %>
<%= f.select :theme_id, @default_design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
<% end %>