1 class ApplicationController < ActionController::Base
6 if Admin.count.to_i == 0 # or License.count.to_i == 0
7 if params[:controller] == 'system' and params[:action] == 'start'
9 redirect_to :controller => '/system', :action => 'start'
14 @author = @user.author
15 @artist = if @author and @author.artist?
18 Artist.new author_id: @author.id, email: @user.email, name: @author.name, default_license_id: 1
25 rescue_from ActiveRecord::RecordNotFound, :with => :render_404
\r
28 def render_404(exception = nil)
\r
30 logger.info "Rendering 404: #{exception.message}"
\r
32 respond_to do |format|
34 render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
\r
37 render :text => "404 found", :status => 404
\r