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
| @coins.each do |c| | |
| #c.cur_name | |
| cur = [] | |
| @coin_cur = Coin.where(:cur_name => c.cur_name).last | |
| @coin_10 = Coin.where(:cur_name => c.cur_name).where("date <?", 10.minutes.ago)[-3] | |
| @coin_20 = Coin.where(:cur_name => c.cur_name).where("date <?", 20.minutes.ago)[-5] | |
| if @coin_cur.price.present? | |
| #binding.pry | |
| dif10 = ((@coin_cur.price/@coin_10.price)*100)-100 |
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
| ngular.module("uploaderComponent", []).directive("fileupload", function() { | |
| return { | |
| restrict: "A", | |
| scope: { | |
| done: "&", | |
| progress: "&", | |
| fail: "&", | |
| uploadurl: "=" | |
| }, | |
| link: function(scope, elem, attrs) { |
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
| Product.all do |product| | |
| product.update_attributes(:desc => product.description.gsub(/<[^>]*>/ui,'')) | |
| 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
| %div.large-12.columns(ng-controller="IndexController") | |
| .section-container.auto{"data-section" => ""} | |
| %section | |
| %p.title{"data-section-title" => ""} | |
| %a{:href => "#panel1"} Показать списком | |
| .content{"data-section-content" => ""} | |
| .row | |
| .large-12.columns | |
| %h5.subheader | |
| = @category.title if @category.present? |
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
| <div ng-controller="ExampleController"> | |
| <div class="google-map" | |
| center="position.coords" | |
| zoom="zoomProperty" | |
| markers="markersProperty" | |
| draggable="true" | |
| fit="false" | |
| events="eventsProperty" | |
| options='{"streetViewControl": false, "mapTypeControl":false, "zoomControl":false}' |
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 $state.current.name == 'tasks' | |
| Task.query( | |
| {} | |
| # Success | |
| , (response) -> | |
| $scope.tasks = response | |
| # Error |
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
| /*Back to top button */ | |
| #back-top{ | |
| position:fixed; | |
| bottom:30px; | |
| right:30px; | |
| } | |
| #back-top a{ | |
| width:80px; | |
| display:block; | |
| text-align:center; |
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
| $(document).ready(function(){ | |
| // прячем кнопку #back-top | |
| $("#back-top").hide(); | |
| // появление/затухание кнопки #back-top | |
| $(function (){ | |
| $(window).scroll(function (){ | |
| if ($(this).scrollTop() > 100){ | |
| $('#back-top').fadeIn(); | |
| } 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
| include OmniAuth::Strategy | |
| option :fields, [:name, :email] | |
| option :on_login, nil | |
| option :on_registration, nil | |
| option :on_failed_registration, nil | |
| option :locate_conditions, lambda{|req| {model.auth_key => req['auth_key']} } | |
| def request_phase | |
| if options[:on_login] |
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
| include OmniAuth::Strategy | |
| option :fields, [:name, :email] | |
| option :on_login, nil | |
| option :on_registration, nil | |
| option :on_failed_registration, nil | |
| option :locate_conditions, lambda{|req| {model.auth_key => req['auth_key']} } | |
| def request_phase | |
| if options[:on_login] |