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
| // Подгрузка страниц при скроллинге | |
| var thisWork = 1; | |
| function getNextP() { | |
| if( !$('div').is('#products') ) | |
| return false; | |
| if(thisWork == 1) { | |
| nextPageNum = $("#products").data('page') + 1; | |
| if(nextPageNum>$("#products").data('pages')) |
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
| if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ]; then | |
| source "$rvm_path/scripts/rvm" | |
| rvm use `cat .ruby-version` | |
| fi |
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
| def show | |
| @show = Show.find(params[:id]) | |
| if stale?(:etag => @show, :last_modified => @show.updated_at.utc) | |
| respond_to do |format| | |
| format.html # index.html.erb | |
| format.json { render json: @show } | |
| end | |
| end | |
| end |
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
| config.exceptions_app = self.routes |
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
| layout proc {|controller| controller.request.xhr? ? "ajax": "application" } |
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
| class CategoryConstraint | |
| def self.matches?(request) | |
| Category.where(alias: request.path_parameters[:categoryalias]).first | |
| end | |
| end |
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
| require "i18n/backend/pluralization" | |
| I18n::Backend::Simple.send(:include, I18n::Backend::Pluralization) |
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
| # -*- encoding: utf-8 -*- | |
| # Правило плюрализации для русского языка, взято из CLDR, http://unicode.org/cldr/ | |
| # | |
| # Russian language pluralization rules, taken from CLDR project, http://unicode.org/cldr/ | |
| # | |
| # one -> n mod 10 is 1 and n mod 100 is not 11; | |
| # few -> n mod 10 in 2..4 and n mod 100 not in 12..14; | |
| # many -> n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14; | |
| # other -> everything else |
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
| en: | |
| errors: | |
| models: | |
| model_name: | |
| attributes: | |
| field_name: | |
| reserved: Такое имя пользователя зарезервированно |
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
| gem 'rack-rewrite' |