This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('<%= j render partial: "cart_form", locals: {product: @product} %>').modal('show'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
$('.btn-ajax').on 'click', (e)-> | |
e.preventDefault() | |
$btn = $(this) | |
$btn.attr('data-default-text', $btn.html()) | |
if $btn.attr('data-processing-text') | |
$btn.html($btn.attr('data-processing-text')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In config.rb | |
def get_locals(category, total_pages, i, articles, total_articles) | |
prev_page = false | |
# Is the a previous page and if so what does it look like | |
if (i - 1) == 1 | |
prev_page = "/blog/categories/#{category}" | |
elsif (i - 1) > 1 | |
prev_page = "/blog/categories/#{category}/page/#{i-1}" | |
end |
OlderNewer