Skip to content

Instantly share code, notes, and snippets.

gem 'rails', '~> 5.1.4'
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
@aleksevd
aleksevd / _form.html.slim
Created September 14, 2018 18:47
Courses
= simple_form_for [:admin, @course], wrapper: :horizontal_form, html: { class: 'form-horizontal' } do |f|
= f.input :name
= f.input :description
= f.association :teacher, label_method: :last_name
= f.association :disciplines
.row
.col-md-11.col-md-offset-3.button_box
= f.button :submit, 'Сохранить', class: 'btn btn-primary'
= link_to 'Отменить', admin_courses_path, class: 'btn btn-default'
@aleksevd
aleksevd / gist:652f8b50b151e531d36e5b0b59ea5364
Created February 27, 2018 08:10
Route for Lessons MassUpdate
namespace :admin do
namespace :api do
namespace :lessons do
resource :mass_update, only: :create
end
end
end
# path helper:
# admin_api_lessons_mass_update_path