Module: ApplicationHelper
- Defined in:
- app/helpers/application_helper.rb
Instance Method Summary collapse
-
#blockly_message_default_locale_name ⇒ Object
default locale name for Blockly messages.
-
#blockly_message_locale_name ⇒ Object
Blocklyのメッセージのlocaleの名前を返す.
- #modal_css_class ⇒ Object
-
#toolbox_css_name ⇒ Object
css name of Toolbox.
-
#toolbox_name ⇒ Object
name of Toolbox.
Instance Method Details
#blockly_message_default_locale_name ⇒ Object
default locale name for Blockly messages
8 9 10 |
# File 'app/helpers/application_helper.rb', line 8 def 'en_us' end |
#blockly_message_locale_name ⇒ Object
Blocklyのメッセージのlocaleの名前を返す
Blocklyではenがen_usであるため
15 16 17 18 19 20 21 |
# File 'app/helpers/application_helper.rb', line 15 def if I18n.locale.to_s == 'en' 'en_us' else I18n.locale end end |
#modal_css_class ⇒ Object
3 4 5 |
# File 'app/helpers/application_helper.rb', line 3 def modal_css_class "modal hide#{raspberrypi? ? '' : ' fade'}" end |
#toolbox_css_name ⇒ Object
css name of Toolbox
29 30 31 32 33 |
# File 'app/helpers/application_helper.rb', line 29 def toolbox_css_name SmalrubyEditor::Config.toolbox_css_name || SmalrubyEditor::Config.toolbox_name || 'default' end |
#toolbox_name ⇒ Object
name of Toolbox
24 25 26 |
# File 'app/helpers/application_helper.rb', line 24 def toolbox_name SmalrubyEditor::Config.toolbox_name || 'default' end |