From 2b75b359f1018f331421f3d1e00ec128af646235 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sun, 18 Dec 2011 20:22:33 +0000 Subject: [PATCH] Fix BscHelper usage of truncate --- plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb | 4 ++-- plugins/bsc/lib/bsc_plugin/bsc_helper.rb | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb b/plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb index e51eb74..47ec1a2 100644 --- a/plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb +++ b/plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb @@ -1,7 +1,7 @@ -include BscPlugin::BscHelper - class BscPluginMyprofileController < MyProfileController + include BscPlugin::BscHelper + def manage_associated_enterprises @associated_enterprises = profile.enterprises @pending_enterprises = profile.enterprise_requests.pending.map(&:enterprise) diff --git a/plugins/bsc/lib/bsc_plugin/bsc_helper.rb b/plugins/bsc/lib/bsc_plugin/bsc_helper.rb index 08286c5..04bba0a 100644 --- a/plugins/bsc/lib/bsc_plugin/bsc_helper.rb +++ b/plugins/bsc/lib/bsc_plugin/bsc_helper.rb @@ -1,5 +1,6 @@ module BscPlugin::BscHelper include ActionView::Helpers::FormTagHelper + include ActionView::Helpers::TextHelper def token_input_field_tag(name, element_id, search_action, options = {}, text_field_options = {}, html_options = {}) options[:min_chars] ||= 3 @@ -69,7 +70,7 @@ module BscPlugin::BscHelper end def short_text(name, chars = 40) - truncate name, chars, '...' + truncate name, :length => chars, :omission => '...' end end -- libgit2 0.21.2