Hi,
I am facing the error msg mention in subject, and my theme doesn’t
change.
*** init.rb ********
require File.join(File.dirname(FILE), “lib”, “fedena_theme”)
FedenaPlugin.register = {
:name=>“fedena_theme”,
:description=>“Fedena Theme”
}
******* /// the line 52 in init.rb showing error /////////////****
52. current_theme =
ActiveRecord::Base::Configuration.get_config_value “Color”
*****fedena_theme.rb **********
TestPlugin
require ‘action_view/helpers/asset_tag_helper’
class FedenaTheme
COLORS = {1 => {:color => “#701288”,:accent_color =>
“#4e0d5f”,:border_color => “#8d41a0”,:sort_order => 16},
2 => {:color => “#39a6ef”,:accent_color =>
“#2874a7”,:border_color => “#61b8f2”,:sort_order => 24},
3 => {:color => “#006290”,:accent_color =>
“#004465”,:border_color => “#3381a6”,:sort_order => 26}
}
FONTS ={1 =>{:text => “Arial”, :value => “Arial”},2 =>{:text =>
“Verdana”, :value => “Verdana, Arial”},3 =>{:text => “Comic Sans MS”,
:value => “Comic Sans MS, Arial”},4 =>{:text => “Georgia”, :value =>
“Georgia, Times new Roman”},5 => {:text => “Times new Roman”, :value =>
“Times new Roman”},6 => {:text => “Trebuchet MS”, :value => “Trebuchet
MS, Arial”},7 => {:text => “Garamond”, :value => “Garamond, Times new
Roman”}}
unloadable
def self.general_settings_form
“configuration/theme_select”
end
def self.available_themes
directory = “#{Rails.public_path}/themes”
themes = Dir.entries(directory).select {|entry| File.directory?
File.join(directory,entry) and !(entry ==’.’ ||
entry == ‘…’) }
return [[‘Default’, ‘default’]]+themes.collect { |theme|
[theme.titleize, theme] }
end
def self.selected_theme
Configuration.get_config_value(“Color”)
end
def self.selected_color_value
val = selected_theme
COLORS[val.to_i][:color]
end
end
********* Errors showing
/vendor/plugins/fedena_theme/init.rb:52: warning: toplevel
constant Configuration referenced by ActiveRecord::Base::Configuration
Please help, I dont understand the error and how to resolve this. I
upgraded my App from Rails 2.3.5 to 2.3.10