small refactoring
This commit is contained in:
@ -1,3 +1,3 @@
|
|||||||
h1 = 'Codeharbor link'
|
h1 = CodeharborLink.model_name.human
|
||||||
|
|
||||||
= render('form')
|
= render('form')
|
||||||
|
@ -9,8 +9,3 @@ h1
|
|||||||
= row(label: 'internal_user.activated', value: @user.activated?)
|
= row(label: 'internal_user.activated', value: @user.activated?)
|
||||||
|
|
||||||
= row(label: 'codeharbor_link.profile_label', value: @user.codeharbor_link.nil? ? link_to(t('codeharbor_link.new'), new_codeharbor_link_path, class: 'btn btn-secondary') : link_to(t('codeharbor_link.edit'), edit_codeharbor_link_path(@user.codeharbor_link), class: 'btn btn-secondary'))
|
= row(label: 'codeharbor_link.profile_label', value: @user.codeharbor_link.nil? ? link_to(t('codeharbor_link.new'), new_codeharbor_link_path, class: 'btn btn-secondary') : link_to(t('codeharbor_link.edit'), edit_codeharbor_link_path(@user.codeharbor_link), class: 'btn btn-secondary'))
|
||||||
|
|
||||||
/ - if @user.codeharbor_link.nil?
|
|
||||||
/ = row(label: 'codeharbor_link.profile_label', value: link_to(t('codeharbor_link.new'), codeharbor_link_new_path, class: 'btn btn-secondary'))
|
|
||||||
/ - else
|
|
||||||
/ = row(label: 'codeharbor_link.profile_label', value: link_to(t('codeharbor_link.edit'), edit_codeharbor_link_path(@user.codeharbor_link), class: 'btn btn-secondary'))
|
|
||||||
|
@ -3,15 +3,15 @@ Rails.application.configure do
|
|||||||
config.webpacker.check_yarn_integrity = true
|
config.webpacker.check_yarn_integrity = true
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
config.web_console.whitelisted_ips = '192.168.0.0/16'
|
config.web_console.whitelisted_ips = '192.168.0.0/16'
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
# every request. This slows down response time but is perfect for development
|
# every request. This slows down response time but is perfect for development
|
||||||
# since you don't have to restart the web server when you make code changes.
|
# since you don't have to restart the web server when you make code changes.
|
||||||
config.cache_classes = false
|
config.cache_classes = false
|
||||||
|
|
||||||
# Do not eager load code on boot.
|
# Do not eager load code on boot.
|
||||||
config.eager_load = true
|
config.eager_load = false
|
||||||
|
|
||||||
# Show full error reports.
|
# Show full error reports.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2019_08_30_142809) do
|
ActiveRecord::Schema.define(version: 2019_09_05_152630) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@ -154,6 +154,7 @@ ActiveRecord::Schema.define(version: 2019_08_30_142809) do
|
|||||||
t.boolean "allow_auto_completion", default: false
|
t.boolean "allow_auto_completion", default: false
|
||||||
t.integer "expected_difficulty", default: 1
|
t.integer "expected_difficulty", default: 1
|
||||||
t.uuid "uuid"
|
t.uuid "uuid"
|
||||||
|
t.string "import_checksum"
|
||||||
t.index ["id"], name: "index_exercises_on_id"
|
t.index ["id"], name: "index_exercises_on_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# stole from: https://makandracards.com/makandra/50526-fileio-writing-strings-as-carrierwave-uploads
|
# stolen from: https://makandracards.com/makandra/50526-fileio-writing-strings-as-carrierwave-uploads
|
||||||
class FileIO < StringIO
|
class FileIO < StringIO
|
||||||
def initialize(stream, filename)
|
def initialize(stream, filename)
|
||||||
super(stream)
|
super(stream)
|
||||||
|
Reference in New Issue
Block a user