diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 89dadeb..d3b36e2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -100,6 +100,14 @@ module ApplicationHelper content end + # Checks a string for spelling mistakes + def spelling(str) + Glsamaker::Spelling.check_string(str, '<span class="spelling-error">'.html_safe, '</span>'.html_safe) + rescue + Rails.logger.error "Spell checking not available" + str + end + # Renders a title bar for our boxes def box_title(title, options = {}) content = "".html_safe |