prepare for plugin import
This commit is contained in:
parent
bee1d68ff2
commit
ae8d222f82
3 changed files with 11 additions and 1 deletions
1
Gemfile
1
Gemfile
|
@ -62,6 +62,7 @@ gem 'rswag-ui'
|
|||
|
||||
# we use the git version of acts_as_versioned, and need to include it in this Gemfile
|
||||
gem 'acts_as_versioned', git: 'https://github.com/technoweenie/acts_as_versioned.git'
|
||||
gem 'foodsoft_article_import', path: 'plugins/article_import'
|
||||
gem 'foodsoft_wiki', path: 'plugins/wiki'
|
||||
gem 'foodsoft_messages', path: 'plugins/messages'
|
||||
gem 'foodsoft_documents', path: 'plugins/documents'
|
||||
|
|
|
@ -16,6 +16,14 @@ GIT
|
|||
acts_as_versioned (0.6.0)
|
||||
activerecord (>= 3.0.9)
|
||||
|
||||
PATH
|
||||
remote: plugins/article_import
|
||||
specs:
|
||||
foodsoft_article_import (0.0.1)
|
||||
deface (~> 1.0)
|
||||
rails
|
||||
roo (~> 2.9.0)
|
||||
|
||||
PATH
|
||||
remote: plugins/discourse
|
||||
specs:
|
||||
|
@ -617,6 +625,7 @@ DEPENDENCIES
|
|||
exception_notification
|
||||
factory_bot_rails
|
||||
faker
|
||||
foodsoft_article_import!
|
||||
foodsoft_discourse!
|
||||
foodsoft_documents!
|
||||
foodsoft_links!
|
||||
|
|
|
@ -8,7 +8,7 @@ module LocalizeInput
|
|||
separator = I18n.t("separator", scope: "number.format")
|
||||
delimiter = I18n.t("delimiter", scope: "number.format")
|
||||
input.gsub!(delimiter, "") if input.match(/\d+#{Regexp.escape(delimiter)}+\d+#{Regexp.escape(separator)}+\d+/) # Remove delimiter
|
||||
input.gsub!(separator, ".") # Replace separator with db compatible character
|
||||
input.gsub!(separator, ".") or input.gsub!(",", ".") # Replace separator with db compatible character
|
||||
input
|
||||
rescue
|
||||
Rails.logger.warn "Can't localize input: #{input}"
|
||||
|
|
Loading…
Reference in a new issue