Module: ComicHelper
- Defined in:
- app/helpers/comic_helper.rb
Instance Method Summary collapse
- #comic_current_url ⇒ Object
- #comic_img_url ⇒ Object
- #comic_url(number) ⇒ Object
- #random_url ⇒ Object
Instance Method Details
#comic_current_url ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/helpers/comic_helper.rb', line 2 def comic_current_url if preview? "/admin/comic/preview" else "/comic" end end |
#comic_img_url ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/helpers/comic_helper.rb', line 18 def comic_img_url if preview? @comic.preview_img_url else @comic.img_url end end |
#comic_url(number) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/helpers/comic_helper.rb', line 10 def comic_url(number) if preview? "/admin/comic/#{number}/preview" else "/comic/#{number}" end end |
#random_url ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/helpers/comic_helper.rb', line 26 def random_url if preview? "/admin/comic/preview_random" else "/comic/random" end end |