Module: Localtower::ApplicationHelper
- Defined in:
- app/helpers/localtower/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#subl_link_to(name, file, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/helpers/localtower/application_helper.rb', line 3 def subl_link_to(name, file, &block) name ||= file if block_given? str = capture(&block) else str = name end link_to str, "subl://open/?url=file://#{file}" end |
#to_json_print(hash) ⇒ Object
13 14 15 16 17 |
# File 'app/helpers/localtower/application_helper.rb', line 13 def to_json_print(hash) # str = hash.to_json # str.gsub(/,"/, ',<br>"').gsub(/\"\:/, '": ').html_safe hash.to_json end |