Fix bug when editing a page, the theme wasn't including blank
This commit is contained in:
1 parent
4db88282a1
commit
f2e3cb00db
5 files changed
+13
-13
No files matched your search
@@ -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?
|
||||
|
||||
@@ -6,6 +6,6 @@ class Purchase
|
||||
field :title
|
||||
field :author
|
||||
field :intro
|
||||
field :downloaded
|
||||
field :downloaded, :type => Boolean
|
||||
|
||||
end
|
||||
@@ -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 %>
|
||||
|
||||
Reference in new issue
Block a user