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 PaidProject do | |
permit_params :user_id, :project_id | |
show do |t| | |
attributes_table do | |
row :user do | |
paid_project.user.name | |
end | |
row :project 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
# | |
# This file configures the New Relic Agent. New Relic monitors Ruby, Java, | |
# .NET, PHP, Python and Node applications with deep visibility and low | |
# overhead. For more information, visit www.newrelic.com. | |
# | |
# Generated August 17, 2017, for version 4.3.0.335 | |
# | |
# For full documentation of agent configuration options, please refer to | |
# https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration |
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
/** | |
* Add signs to videos | |
* Фрейм с видео должен содержать класс "video--signed" и находиться в блоке контейнера ```<div class="video-container">```. При добавлении видео необходимо указать атрибут фрейма ```fs="0"```, чтобы не срабатывал полноэкранный режим фрейма. | |
* Параметры прописываются в виде data-* атрибутов фрейма с видео. | |
* Параметры: | |
* - data-sign-opacity - прозрачность от 0 до 1 | |
* - data-sign-color - цвет в любом формате CSS | |
* - data-sign-font-size - размер шрифта | |
* - data-sign-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
<div id="wistia_<%= @task.video %>"> | |
<% if @task.video.length > 10 %> | |
<iframe width="640" height="360" src="<%= @task.video %>" frameborder="0" allowfullscreen></iframe> | |
<% else %> | |
<iframe src="https://player.vimeo.com/video/<%= @task.video %>" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen> | |
<div class=""> | |
<%= current_user.email %> | |
</div> | |
</iframe> | |
<% 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
class Users::RegistrationsController < Devise::RegistrationsController | |
# before_action :configure_sign_up_params, only: [:create] | |
# before_action :configure_account_update_params, only: [:update] | |
# GET /resource/sign_up | |
# def new | |
# super | |
# end | |
# POST /resource |
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 User do | |
permit_params :email, :name, :paid, :user_id, :first_ip, :current_sign_in_ip, :password | |
member_action :reset_ip, method: :put do | |
resource.first_ip = resource.current_sign_in_ip | |
resource.save! | |
redirect_to resource_path, notice: "IP сброшен!" | |
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
<% if @reviews.blank? %> | |
<span class="center"><h4>У этого курса пока нет отзывов</h4></span> | |
<% end %> | |
<% @reviews.order("id desc").each do |r| %> | |
<hr> | |
<div class="row"> | |
<div class="col m1"> | |
<%= image_tag avatar_url(r.user), class: "circle responsive-img avatar-small" %> |
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 Users::RegistrationsController < Devise::RegistrationsController | |
# before_action :configure_sign_up_params, only: [:create] | |
# before_action :configure_account_update_params, only: [:update] | |
# GET /resource/sign_up | |
# def new | |
# super | |
# end | |
# POST /resource |
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 class="card-action grey-text text-darken-4"> | |
<form action="#"> | |
<div class="file-field input-field"> | |
<div class="btn"> | |
<span>Сдать отчет</span> | |
<input type="file" multiple> | |
</div> | |
<div class="file-path-wrapper"> | |
<%= form_tag.file_field :reports, :class=>"file-path validate", :placeholder => "Загрузите один или более файлов", multiple: true %> | |
</div> |
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 CreateTaskstatuses < ActiveRecord::Migration | |
def change | |
create_table :taskstatuses do |t| | |
t.reference :user | |
t.reference :task | |
t.string :task_status | |
t.timestamps null: false | |
end |