Module | ApplicationHelper |
In: |
app/helpers/application_helper.rb
|
Methods added to this helper will be available to all templates in the application.
# File app/helpers/application_helper.rb, line 30 30: def clean_up st 31: st.match(/\/([\w ]*)\./)? 32: $1.upcase.gsub(' ','-') : st 33: end
# File app/helpers/application_helper.rb, line 12 12: def format_selected(st) 13: @preselected+st+@postselected 14: end
# File app/helpers/application_helper.rb, line 16 16: def format_unselected(st) 17: @preunselected+st+@postunselected 18: end
# File app/helpers/application_helper.rb, line 22 22: def image_html(pic,size) 23: #returns pic with html image formatting 24: if pic.empty? 25: '' 26: else 27: image_tag(pic, :size =>size) 28: end 29: end
# File app/helpers/application_helper.rb, line 3 3: def my_meta 4: if @refresh 5: '<meta http-equiv="REFRESH"content="'+ 6: "#{@delay}"+';URL=/' + 7: @thiscontroller+'/index/_refresh" />' 8: else 9: '' 10: end 11: end