Module: ApplicationHelper

Defined in:
app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#blockly_message_default_locale_nameObject

default locale name for Blockly messages



8
9
10
# File 'app/helpers/application_helper.rb', line 8

def blockly_message_default_locale_name
  'en_us'
end

#blockly_message_locale_nameObject

Blocklyのメッセージのlocaleの名前を返す

Blocklyではenがen_usであるため



15
16
17
18
19
20
21
# File 'app/helpers/application_helper.rb', line 15

def blockly_message_locale_name
  if I18n.locale.to_s == 'en'
    'en_us'
  else
    I18n.locale
  end
end


3
4
5
# File 'app/helpers/application_helper.rb', line 3

def modal_css_class
  "modal hide#{raspberrypi? ? '' : ' fade'}"
end

#toolbox_css_nameObject

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_nameObject

name of Toolbox



24
25
26
# File 'app/helpers/application_helper.rb', line 24

def toolbox_name
  SmalrubyEditor::Config.toolbox_name || 'default'
end