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
1629 server Куда твоя мысль заведет тебя? | |
1630 user Сработало? | |
1631 server Конечно, сработало! Как часы, которые всегда показывают время для улыбки! 😄 Что именно сработало, если не секрет? | |
1632 server Конечно, сработало! Как часы, которые всегда показывают время для улыбки! 😄 Что именно сработало, если не секрет? | |
1633 user Есть контакт? | |
1634 server Есть контакт! Как у розетки с вилкой — искры летят, но в хорошем смысле! 🔌✨ Чем могу помочь? | |
1635 server Есть контакт! Как у розетки с вилкой — искры летят, но в хорошем смысле! 🔌✨ Чем могу помочь? | |
1636 user Все, теперь вы синхронны | |
1637 server Отлично! Мы теперь как два горошка в стручке — на одной волне! 🌱😄 Что будем делать дальше? | |
1638 server Отлично! Мы теперь как два горошка в стручке — на одной волне! 🌱😄 Что будем делать дальше? |
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
# syntax=docker/dockerfile:1 | |
FROM ruby:3.0 | |
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client npm | |
RUN npm install -g yarn | |
WORKDIR /myapp | |
COPY Gemfile /myapp/Gemfile | |
COPY Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install | |
RUN yarn |
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 Sms | |
URL = 'https://gatewayapi.com/rest/mtsms' | |
def self.send(number, text) | |
if Rails.env.production? || Rails.env.staging? #TODO: feature flags | |
send_sms(number, text) | |
else | |
write_to_file(number, text) # sms text will be available at your.domain/public/pwd.txt | |
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 'singleton' | |
module MySingleton | |
def self.included(base) | |
base.class_eval { include Singleton } | |
end | |
def mymethod | |
p 'Helo World' | |
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
gem 'active_admin_editor', github: 'boontdustie/active_admin_editor' | |
gem 'carrierwave' | |
group :development, :test do | |
gem 'rmagick' | |
gem 'mini_magick' | |
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
ActiveAdmin.register_page "OrderAssignation" do | |
menu false | |
controller do | |
def index | |
params[:order] = Order.find(params[:order_id]) | |
end | |
end | |
content title: proc{ I18n.t("admin.delivery.assign") } do |
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 Category < ApplicationRecord | |
acts_as_nested_set | |
has_many :properties, dependent: :destroy | |
has_and_belongs_to_many :items | |
accepts_nested_attributes_for :properties, allow_destroy: true | |
mount_uploader :icon, CategoryIconUploader | |
scope :index, -> { where(parent_id: nil, show: true).order('items_count DESC').limit(10) } | |
scope :main, -> { where(parent_id: nil, show: true).order('items_count DESC') } |
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
<html> | |
<head> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.min.js"></script> | |
</head> | |
<body> | |
<div> <script src="http://cloud.tvigle.ru/static/player/player_builder.min.js" type="text/javascript"> | |
</script> | |
<script type="text/javascript"> | |
var Listener = function () { |