Skip to content

Commit

Permalink
MonkeyPatch for Invalid UTF-8 in database
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Ageev committed Jul 22, 2013
1 parent ccb8171 commit 43d3357
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ coverage
# rdoc generated
rdoc

# IDE and tools files

.idea
.bundle
.rvmrc

# yard generated
doc
.yardoc
Expand Down
7 changes: 6 additions & 1 deletion app/views/active_scaffold_overrides/_list_record.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ data_refresh ||= url_for(params_for(:action => :row, :id => '--ID--', :_method =
<tr class="record <%= tr_class %>" id="<%= element_row_id(:action => :list, :id => record.id) %>" data-refresh="<%= data_refresh.sub('--ID--', record.id.to_s) %>">
<% columns.each do |column| %>
<% authorized = record.authorized_for?(:crud_type => :read, :column => column.name) -%>
<% column_value = authorized ? get_column_value(record, column) : active_scaffold_config.list.empty_field_text -%>

<% begin %>
<% column_value = authorized ? get_column_value(record, column) : active_scaffold_config.list.empty_field_text -%>
<% rescue Exception => e %>
<% column_value = active_scaffold_config.list.empty_field_text -%>
<% end %>

<%= content_tag :td, column_attributes(column, record).merge(:class => column_class(column, column_value, record)) do %>
<%= authorized ? render_list_column(column_value, column, record) : column_value %>
Expand Down

0 comments on commit 43d3357

Please sign in to comment.