This file contains 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 AddNewDataToDeliveryPrices < ActiveRecord::Migration | |
def change | |
DeliveryPrice.destroy_all | |
#================================== | |
# DELIVERY METHOD ID = 1 | |
#================================== | |
# POST ZONE 1 | |
DeliveryPrice.create!(delivery_method_id: 1, post_zone_id: 1,min_weight:0, max_weight:500, price:300) |
This file contains 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 SorceryCore < ActiveRecord::Migration | |
def change | |
create_table :auth_emails do |t| | |
t.string :email, :null => false | |
t.string :crypted_password, :null => false | |
t.string :salt, :null => false | |
t.timestamps | |
end |
This file contains 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
module InstanceMethods | |
# generates a reset code with expiration and sends an email to the user. | |
def deliver_reset_password_instructions! | |
config = sorcery_config | |
# hammering protection | |
return false if config.reset_password_time_between_emails && self.send(config.reset_password_email_sent_at_attribute_name) && self.send(config.reset_password_email_sent_at_attribute_name) > config.reset_password_time_between_emails.ago.utc | |
attributes = {config.reset_password_token_attribute_name => TemporaryToken.generate_random_token, | |
config.reset_password_email_sent_at_attribute_name => Time.now.in_time_zone} | |
attributes[config.reset_password_token_expires_at_attribute_name] = Time.now.in_time_zone + config.reset_password_expiration_period if config.reset_password_expiration_period | |
self.class.transaction do |
This file contains 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
module Sorcery | |
module Model | |
module Submodules | |
module ResetPassword | |
module InstanceMethods | |
def deliver_reset_password_instructions! | |
config = sorcery_config | |
# hammering protection | |
return false if config.reset_password_time_between_emails && self.send(config.reset_password_email_sent_at_attribute_name) && self.send(config.reset_password_email_sent_at_attribute_name) > config.reset_password_time_between_emails.ago.utc | |
attributes = {config.reset_password_token_attribute_name => TemporaryToken.generate_random_token, |
This file contains 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
.item | |
.center | |
h4 Активные наушники MSA Sordin Supreme Pro X | |
.row | |
.col-sm-6 | |
.center | |
img.img-responsive src=image_path('banners/419-sm-nq8.png') | |
.col-sm-6 | |
p Активные наушники Шведской фирмы ""MSA Sоrdin"" Supreme Pro- это мировая новинка в области электронной защиты слуха и прекрасное решение для охоты и спортивной стрельбы. Ветрозащитные стереомикрофоны обеспечивают прослушивание звуковой ""картины"" на 360 градусов, что позволяет ориентироваться на звук. | |
p Самые слабые шумы окружающей среды могут усиливаться активной электроникой в 4 раза. При стрельбе глушение шума составляет около одной секунды (0,8 сек.) и защищает слух от звука и эха выстрела, при этом удар пули отчетливо слышен. |
This file contains 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 AddDataToPaymentMethod < ActiveRecord::Migration | |
def change | |
PaymentMethod.create!(name: 'Оплата через Robokassa (Visa, MasterCard, Web Money, Связной и т.д)', description:'<p class="text-primary">Внимание! Комиссия при таком способе оплаты - 3-4%</p><p> После заполнения формы ниже Вы будете перенаправлены на сайт Робокассы для внесения платежа.</p>') | |
PaymentMethod.create!(name: 'Оплата переводом на карту Сбербанка', description: '<p> Денежные средства необходимо перевести на карточку нашего сотрудника.</p><p>Номер карты: <b> 4276 3800 5109 3461 </b><br>Владелец карты: <b> Марданян Артем Артурович </b><br>Номер телефона, владельца карты: <b> +7 (925) 016-82-42</b><p class="text-primary"> Внимание! В комментариях к переводу обязательно укажите свое ФИО. </p><p class="text-primary"><b> Комиссия 0% </b></p>') | |
PaymentMethod.create!(name: 'Оплата электронными деньгами (Вебмани, Яндекс.Деньги, Киви-кошелек)', description: '<p> Реквизиты электронных денег:<p>Яндекс.Кошелек <b> 410011214043930</b><br> |
This file contains 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
.dropdown | |
button#dropdownMenu1.btn.btn-default.dropdown-toggle data-toggle="dropdown" type="button" | |
| Dropdown | |
span.caret | |
ul.dropdown-menu aria-labelledby="dropdownMenu1" role="menu" | |
li role="presentation" | |
a href="#" role="menuitem" tabindex="-1" Action | |
li role="presentation" | |
a href="#" role="menuitem" tabindex="-1" Another action | |
li role="presentation" |
This file contains 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 !local_assigns[:product_id] | |
- product_id = nil | |
div ng-controller='ArticleCommentCtrl' | |
form ng-hide="comment_form.registered" ng-submit="register(#{article_id})" | |
p Оставьте свой отзыв | |
.form-group | |
textarea#article.form-control name="article" rows=5 required="required" placeholder='Ваш отзыв*' ng-model='comment_form.article' | |
.form-group | |
.center | |
button.btn.btn-default name="commit" type="submit" |
This file contains 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
angular.module('Shop').controller('ArticleCommentCtrl', ['$scope', '$http', ($scope, $http) -> | |
$scope.comment_form = | |
full_name: null | |
email: null | |
comment: null | |
$scope.register = (article_id = null) -> | |
$http( | |
method: "GET" |
This file contains 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 RemoveDateAndAddDataToAnnouncements < ActiveRecord::Migration | |
def change | |
Announcement.all.each do |announcement| | |
announcement.update_attribute(:created_at, announcement.date) | |
end | |
remove_column :announcements, :date | |
end | |
end |
OlderNewer