Sha256: d91e5b3d612fa118330af60f7a34768012190fca54cd4c2af332c37ed54b3fb1

Contents?: true

Size: 957 Bytes

Versions: 10

Compression:

Stored size: 957 Bytes

Contents

module ErpTechSvcs
  module Extensions
    module Railties
      module ActionView
        module Helpers
          module IncludeHelper

            def set_max_file_upload
              raw "<script type='text/javascript'>Ext.ns('ErpTechSvcs.Config'); ErpTechSvcs.Config.max_file_size_in_mb = #{ErpTechSvcs::Config.max_file_size_in_mb};</script>"
            end

            def set_email_regex
              raw "<script type='text/javascript'>ErpTechSvcs.Config.email_regex = \"#{ErpTechSvcs::Config.email_regex}\";</script>"
            end

            def set_file_upload_types
              raw "<script type='text/javascript'>ErpTechSvcs.Config.file_upload_types = \"#{ErpTechSvcs::Config.file_upload_types}\";</script>"
            end
            
            def set_erp_tech_config_vars
              raw "#{set_max_file_upload} #{set_email_regex} #{set_file_upload_types}"
            end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
erp_tech_svcs-4.2.0 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-4.0.0 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.8 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.7 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.5 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.4 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.3 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.2 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.1 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb
erp_tech_svcs-3.1.0 lib/erp_tech_svcs/extensions/railties/action_view/helpers/include_helper.rb