Module: Railstar

Defined in:
lib/railstar.rb,
lib/railstar/engine.rb,
lib/railstar/helper.rb,
lib/railstar/version.rb,
lib/railstar/code_holder.rb,
lib/railstar/search_base.rb,
lib/railstar/active_record_ext.rb,
app/helpers/railstar/general_helper.rb,
app/helpers/railstar/feedbacks_helper.rb,
app/helpers/railstar/application_helper.rb,
app/controllers/railstar/general_controller.rb,
app/controllers/railstar/feedbacks_controller.rb,
app/controllers/railstar/application_controller.rb

Overview

require ‘railstar/column_comment’ if /mysql/i =~ Rails.configuration.database_configuration[“adapter”]

Defined Under Namespace

Modules: ActiveRecordExt, ApplicationHelper, FeedbacksHelper, GeneralHelper, Helper, SearchBase Classes: ApplicationController, Code, CodeHolder, CodeList, DuplicatePosition, DuplicateValue, Engine, FeedbacksController, GeneralController, InstallGenerator, ScaffoldGenerator, UndefinedCode

Constant Summary collapse

VERSION =
"0.0.12"

Class Method Summary collapse

Class Method Details

.code_dirObject



27
28
29
# File 'lib/railstar.rb', line 27

def self.code_dir
  self.root + "/../config/resources/code"
end

.envObject



13
14
15
# File 'lib/railstar.rb', line 13

def self.env
  @env ||= load_env
end

.load_envObject



17
18
19
20
21
22
23
24
25
# File 'lib/railstar.rb', line 17

def self.load_env
  puts "################# LOAD railstar.yml #################"
  if File.exist?(file = File.join(Rails.root.to_s, 'config', 'railstar.yml'))
    rs = YAML.load_file(file)
    (rs["default"] || {}).merge(rs[Rails.env] || {})
  else
    {}
  end
end

.rootObject



31
32
33
# File 'lib/railstar.rb', line 31

def self.root
  RAILSTAR_ROOT
end