Commit 2b75b359f1018f331421f3d1e00ec128af646235

Authored by Antonio Terceiro
1 parent be675479

Fix BscHelper usage of truncate

plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb
1 -include BscPlugin::BscHelper  
2 -  
3 class BscPluginMyprofileController < MyProfileController 1 class BscPluginMyprofileController < MyProfileController
4 2
  3 + include BscPlugin::BscHelper
  4 +
5 def manage_associated_enterprises 5 def manage_associated_enterprises
6 @associated_enterprises = profile.enterprises 6 @associated_enterprises = profile.enterprises
7 @pending_enterprises = profile.enterprise_requests.pending.map(&:enterprise) 7 @pending_enterprises = profile.enterprise_requests.pending.map(&:enterprise)
plugins/bsc/lib/bsc_plugin/bsc_helper.rb
1 module BscPlugin::BscHelper 1 module BscPlugin::BscHelper
2 include ActionView::Helpers::FormTagHelper 2 include ActionView::Helpers::FormTagHelper
  3 + include ActionView::Helpers::TextHelper
3 4
4 def token_input_field_tag(name, element_id, search_action, options = {}, text_field_options = {}, html_options = {}) 5 def token_input_field_tag(name, element_id, search_action, options = {}, text_field_options = {}, html_options = {})
5 options[:min_chars] ||= 3 6 options[:min_chars] ||= 3
@@ -69,7 +70,7 @@ module BscPlugin::BscHelper @@ -69,7 +70,7 @@ module BscPlugin::BscHelper
69 end 70 end
70 71
71 def short_text(name, chars = 40) 72 def short_text(name, chars = 40)
72 - truncate name, chars, '...' 73 + truncate name, :length => chars, :omission => '...'
73 end 74 end
74 75
75 end 76 end