Sha256: f06f2b91553f2f70065abc9d12220b35d776df1a98e9ff3bff09fa851805d131
Contents?: true
Size: 566 Bytes
Versions: 4
Compression:
Stored size: 566 Bytes
Contents
class OnboardingController < ApplicationController def index if File.exist?(Rails.application.paths['config/secrets'].expanded.last) render 'complete' and return end render 'welcome' end protected def save_configurations! File.open(Rails.application.paths['config/secrets'].expanded.last, 'w') do |file| config = ActiveRecord::Base.configurations config['development']['secret_key_base'] = config['production']['secret_key'] = Rails.application.secrets.secret_key_base file.write(config.to_yaml) end end end
Version data entries
4 entries across 4 versions & 1 rubygems