Fixed bugs for nccu
This commit is contained in:
		
							parent
							
								
									11a371cbb9
								
							
						
					
					
						commit
						d6b92fc604
					
				|  | @ -74,7 +74,7 @@ class OrbitBackendController< ApplicationController | ||||||
|           when 'categories' |           when 'categories' | ||||||
|             a = Array.new |             a = Array.new | ||||||
|             objects.each do |object| |             objects.each do |object| | ||||||
|               a << object if value.include?(object.send("#{object.class.to_s.underscore}_category").id.to_s) |               a << object if (value.include?(object.send("#{object.class.to_s.underscore}_category").id.to_s) rescue nil) | ||||||
|             end |             end | ||||||
|             objects = a.uniq |             objects = a.uniq | ||||||
|           when 'tags' |           when 'tags' | ||||||
|  | @ -99,9 +99,9 @@ class OrbitBackendController< ApplicationController | ||||||
|     if s |     if s | ||||||
|       case s.class.to_s |       case s.class.to_s | ||||||
|         when "String" |         when "String" | ||||||
|           s.downcase |           s.downcase rescue '' | ||||||
|         when "I18nVariable" |         when "I18nVariable" | ||||||
|           s[I18n.locale].downcase |           s[I18n.locale].downcase rescue '' | ||||||
|         else |         else | ||||||
|           nil |           nil | ||||||
|         end |         end | ||||||
|  |  | ||||||
|  | @ -5,4 +5,4 @@ | ||||||
|     per_page:      number of items to fetch per page |     per_page:      number of items to fetch per page | ||||||
|     remote:        data-remote |     remote:        data-remote | ||||||
| -%> | -%> | ||||||
| <li class="page gap"><%= raw(t 'views.pagination.truncate') %></li> | <!-- <li class="page gap"><%= raw(t 'views.pagination.truncate') %></li> --> | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ | ||||||
| 		</tr> | 		</tr> | ||||||
| 		<% @news_bulletins.each do |post| %> | 		<% @news_bulletins.each do |post| %> | ||||||
| 		<tr> | 		<tr> | ||||||
| 			<td><%= image_tag post.image %></td> | 			<td><%= image_tag post.image rescue nil %></td> | ||||||
| 			<td> | 			<td> | ||||||
| 				<%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %> | 				<%= link_to post.title[I18n.locale], panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %> | ||||||
| 				<%= post.subtitle[I18n.locale].html_safe %> | 				<%= post.subtitle[I18n.locale].html_safe %> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue