Removed unused acts_as_configurable gem.

This commit is contained in:
Benjamin Meichsner 2013-09-02 10:03:12 +02:00
parent 3e4c535bb1
commit 4ea940e4a3
4 changed files with 38 additions and 50 deletions

View file

@ -71,7 +71,3 @@ group :development do
# Avoid having content-length warnings
gem 'thin'
end
# Gems left for backwards compatibility
gem 'acts_as_configurable', git: 'git://github.com/bwalding/acts_as_configurable.git' # user settings migration needs it

View file

@ -4,13 +4,6 @@ GIT
specs:
localize_input (0.1.0)
GIT
remote: git://github.com/bwalding/acts_as_configurable.git
revision: cdf6f6f979019275b523d10684b748f08e2dd8e8
specs:
acts_as_configurable (0.0.1)
rake
GIT
remote: git://github.com/technoweenie/acts_as_versioned.git
revision: 63b1fc8529d028fae632fe80ec0cb25df56cd76b
@ -263,7 +256,6 @@ PLATFORMS
ruby
DEPENDENCIES
acts_as_configurable!
acts_as_tree
acts_as_versioned!
better_errors

View file

@ -1,12 +1,18 @@
class MigrateUserSettings < ActiveRecord::Migration
def up
say_with_time 'Save old user settings in new RailsSettings module' do
old_settings = ConfigurableSetting.all
old_settings.each do |old_setting|
# get target (user)
type = old_setting.configurable_type
id = old_setting.configurable_id
begin
user = type.constantize.find(id)
rescue ActiveRecord::RecordNotFound
Rails.logger.debug "Can't find configurable object with type: #{type.inspect}, id: #{id.inspect}"
next
end
# get the data (settings)
name = old_setting.name
@ -29,6 +35,12 @@ class MigrateUserSettings < ActiveRecord::Migration
end
end
drop_table :configurable_settings
end
def down
end
end
# this is the base class of all configurable settings
class ConfigurableSetting < ActiveRecord::Base; end

View file

@ -66,18 +66,6 @@ ActiveRecord::Schema.define(:version => 20130718183101) do
add_index "assignments", ["user_id", "task_id"], :name => "index_assignments_on_user_id_and_task_id", :unique => true
create_table "configurable_settings", :force => true do |t|
t.integer "configurable_id"
t.string "configurable_type"
t.integer "targetable_id"
t.string "targetable_type"
t.string "name", :default => "", :null => false
t.string "value_type"
t.text "value"
end
add_index "configurable_settings", ["name"], :name => "index_configurable_settings_on_name"
create_table "deliveries", :force => true do |t|
t.integer "supplier_id"
t.date "delivered_on"