- if klass = parse_class(camelize(source_name))
- klass.enable
- @config["enabled_sources"] << klass.name
- @config["enabled_sources"].uniq!
+ if available_sources.include?(source_name)
+ if klass = parse_class(camelize(source_name))
+ klass.enable
+ @config["enabled_sources"] << klass.name
+ @config["enabled_sources"].uniq!
+ @config.save_config
+ else
+ raise EnableSourceException
+ end