qalam_merit 4.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/CODE_OF_CONDUCT.md +84 -0
  4. data/Gemfile +10 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +358 -0
  7. data/RELEASING.md +16 -0
  8. data/Rakefile +44 -0
  9. data/TESTING.txt +12 -0
  10. data/config/locales/en.yml +5 -0
  11. data/lib/merit.rb +95 -0
  12. data/lib/merit/badge_rules_methods.rb +30 -0
  13. data/lib/merit/base_target_finder.rb +31 -0
  14. data/lib/merit/class_methods.rb +41 -0
  15. data/lib/merit/controller_extensions.rb +71 -0
  16. data/lib/merit/generators/active_record/install_generator.rb +40 -0
  17. data/lib/merit/generators/active_record/merit_generator.rb +25 -0
  18. data/lib/merit/generators/active_record/remove_generator.rb +30 -0
  19. data/lib/merit/generators/active_record/templates/add_merit_fields_to_model.erb +7 -0
  20. data/lib/merit/generators/active_record/templates/create_badges_sashes.erb +14 -0
  21. data/lib/merit/generators/active_record/templates/create_merit_actions.erb +16 -0
  22. data/lib/merit/generators/active_record/templates/create_merit_activity_logs.erb +12 -0
  23. data/lib/merit/generators/active_record/templates/create_merit_badges.erb +17 -0
  24. data/lib/merit/generators/active_record/templates/create_sashes.erb +8 -0
  25. data/lib/merit/generators/active_record/templates/create_scores_and_points.erb +16 -0
  26. data/lib/merit/generators/active_record/templates/remove_merit_fields_from_model.erb +7 -0
  27. data/lib/merit/generators/active_record/templates/remove_merit_tables.erb +12 -0
  28. data/lib/merit/generators/install_generator.rb +30 -0
  29. data/lib/merit/generators/merit_generator.rb +33 -0
  30. data/lib/merit/generators/remove_generator.rb +23 -0
  31. data/lib/merit/generators/templates/badge.erb +69 -0
  32. data/lib/merit/generators/templates/merit.erb +18 -0
  33. data/lib/merit/generators/templates/merit_badge_rules.erb +50 -0
  34. data/lib/merit/generators/templates/merit_point_rules.erb +31 -0
  35. data/lib/merit/generators/templates/merit_rank_rules.erb +32 -0
  36. data/lib/merit/generators/templates/qalam_badge_sash.erb +20 -0
  37. data/lib/merit/generators/templates/qalam_sash.erb +14 -0
  38. data/lib/merit/judge.rb +102 -0
  39. data/lib/merit/models/action_concern.rb +50 -0
  40. data/lib/merit/models/active_record/action.rb +11 -0
  41. data/lib/merit/models/active_record/activity_log.rb +11 -0
  42. data/lib/merit/models/active_record/badges_sash.rb +13 -0
  43. data/lib/merit/models/active_record/sash.rb +32 -0
  44. data/lib/merit/models/active_record/score.rb +25 -0
  45. data/lib/merit/models/badges_sash_concern.rb +13 -0
  46. data/lib/merit/models/base/badges_sash.rb +15 -0
  47. data/lib/merit/models/base/sash.rb +55 -0
  48. data/lib/merit/models/sash_concern.rb +53 -0
  49. data/lib/merit/point_rules_methods.rb +33 -0
  50. data/lib/merit/rank_rules_methods.rb +58 -0
  51. data/lib/merit/reputation_change_observer.rb +19 -0
  52. data/lib/merit/rule.rb +35 -0
  53. data/lib/merit/rules_matcher.rb +24 -0
  54. data/lib/merit/sash_finder.rb +15 -0
  55. data/lib/merit/target_finder.rb +43 -0
  56. data/qalam_merit.gemspec +23 -0
  57. data/test/dummy/Rakefile +7 -0
  58. data/test/dummy/app/controllers/admin/users_controller.rb +9 -0
  59. data/test/dummy/app/controllers/api/comments_controller.rb +5 -0
  60. data/test/dummy/app/controllers/api/users_controller.rb +5 -0
  61. data/test/dummy/app/controllers/application_controller.rb +7 -0
  62. data/test/dummy/app/controllers/comments_controller.rb +56 -0
  63. data/test/dummy/app/controllers/registrations_controller.rb +21 -0
  64. data/test/dummy/app/controllers/users_controller.rb +38 -0
  65. data/test/dummy/app/helpers/application_helper.rb +2 -0
  66. data/test/dummy/app/models/address.rb +3 -0
  67. data/test/dummy/app/models/comment.rb +13 -0
  68. data/test/dummy/app/models/dummy_observer.rb +3 -0
  69. data/test/dummy/app/models/merit/badge_rules.rb +66 -0
  70. data/test/dummy/app/models/merit/point_rules.rb +44 -0
  71. data/test/dummy/app/models/merit/rank_rules.rb +24 -0
  72. data/test/dummy/app/models/user.rb +23 -0
  73. data/test/dummy/app/views/admin/users/index.html.erb +26 -0
  74. data/test/dummy/app/views/comments/_form.html.erb +29 -0
  75. data/test/dummy/app/views/comments/edit.html.erb +6 -0
  76. data/test/dummy/app/views/comments/index.html.erb +35 -0
  77. data/test/dummy/app/views/comments/new.html.erb +5 -0
  78. data/test/dummy/app/views/comments/show.html.erb +23 -0
  79. data/test/dummy/app/views/layouts/application.html.erb +24 -0
  80. data/test/dummy/app/views/users/_form.html.erb +22 -0
  81. data/test/dummy/app/views/users/edit.html.erb +6 -0
  82. data/test/dummy/app/views/users/index.html.erb +27 -0
  83. data/test/dummy/app/views/users/new.html.erb +5 -0
  84. data/test/dummy/app/views/users/show.html.erb +18 -0
  85. data/test/dummy/config.ru +4 -0
  86. data/test/dummy/config/application.rb +26 -0
  87. data/test/dummy/config/application_api_only.rb +28 -0
  88. data/test/dummy/config/boot.rb +10 -0
  89. data/test/dummy/config/database.yml +22 -0
  90. data/test/dummy/config/environment.rb +5 -0
  91. data/test/dummy/config/environment_api_only.rb +7 -0
  92. data/test/dummy/config/environments/development.rb +24 -0
  93. data/test/dummy/config/environments/production.rb +51 -0
  94. data/test/dummy/config/environments/test.rb +36 -0
  95. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  96. data/test/dummy/config/initializers/inflections.rb +10 -0
  97. data/test/dummy/config/initializers/merit.rb +47 -0
  98. data/test/dummy/config/initializers/mime_types.rb +5 -0
  99. data/test/dummy/config/initializers/new_framework_defaults.rb +3 -0
  100. data/test/dummy/config/initializers/secret_token.rb +12 -0
  101. data/test/dummy/config/initializers/session_store.rb +8 -0
  102. data/test/dummy/config/locales/en.yml +5 -0
  103. data/test/dummy/config/mongoid.yml +13 -0
  104. data/test/dummy/config/routes.rb +16 -0
  105. data/test/dummy/db/migrate/20110421191249_create_users.rb +12 -0
  106. data/test/dummy/db/migrate/20110421191250_create_comments.rb +16 -0
  107. data/test/dummy/db/migrate/20120318022220_add_fields_to_users.rb +11 -0
  108. data/test/dummy/db/migrate/20130321082817_add_fields_to_comments.rb +11 -0
  109. data/test/dummy/db/migrate/20130329224406_create_merit_actions.rb +18 -0
  110. data/test/dummy/db/migrate/20130329224407_create_merit_activity_logs.rb +15 -0
  111. data/test/dummy/db/migrate/20130329224408_create_sashes.rb +11 -0
  112. data/test/dummy/db/migrate/20130329224409_create_badges_sashes.rb +16 -0
  113. data/test/dummy/db/migrate/20130329224410_create_scores_and_points.rb +20 -0
  114. data/test/dummy/db/migrate/20140211144001_create_addresses.rb +11 -0
  115. data/test/dummy/db/migrate/20140819133931_add_target_data_to_merit_actions.rb +5 -0
  116. data/test/dummy/db/schema.rb +89 -0
  117. data/test/dummy/db/seeds.rb +19 -0
  118. data/test/dummy/public/404.html +26 -0
  119. data/test/dummy/public/422.html +26 -0
  120. data/test/dummy/public/500.html +26 -0
  121. data/test/dummy/public/favicon.ico +0 -0
  122. data/test/dummy/public/rails.js +404 -0
  123. data/test/dummy/public/stylesheets/.gitkeep +0 -0
  124. data/test/dummy/public/stylesheets/scaffold.css +56 -0
  125. data/test/dummy/script/rails +6 -0
  126. data/test/integration/navigation_test.rb +332 -0
  127. data/test/support/integration_case.rb +5 -0
  128. data/test/test_helper.rb +40 -0
  129. data/test/unit/action_test.rb +12 -0
  130. data/test/unit/base_target_finder_test.rb +64 -0
  131. data/test/unit/merit_unit_test.rb +33 -0
  132. data/test/unit/rule_unit_test.rb +57 -0
  133. data/test/unit/rules_matcher_test.rb +37 -0
  134. data/test/unit/sash_finder_test.rb +27 -0
  135. data/test/unit/sash_test.rb +104 -0
  136. data/test/unit/score_test.rb +13 -0
  137. data/test/unit/target_finder_test.rb +98 -0
  138. metadata +360 -0
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Load the rails application
4
+ require File.expand_path("application_api_only", __dir__)
5
+
6
+ # Initialize the rails application
7
+ Dummy::Application.initialize!
@@ -0,0 +1,24 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the webserver when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Show full error reports and disable caching
10
+ config.consider_all_requests_local = true
11
+ config.action_controller.perform_caching = false
12
+
13
+ # Don't care if the mailer can't send
14
+ config.action_mailer.raise_delivery_errors = false
15
+
16
+ # Print deprecation notices to the Rails logger
17
+ config.active_support.deprecation = :log
18
+
19
+ # Only use best-standards-support built into browsers
20
+ config.action_dispatch.best_standards_support = :builtin
21
+
22
+ config.eager_load = false
23
+ end
24
+
@@ -0,0 +1,51 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The production environment is meant for finished, "live" apps.
5
+ # Code is not reloaded between requests
6
+ config.cache_classes = true
7
+
8
+ # Full error reports are disabled and caching is turned on
9
+ config.consider_all_requests_local = false
10
+ config.action_controller.perform_caching = true
11
+
12
+ # Specifies the header that your server uses for sending files
13
+ config.action_dispatch.x_sendfile_header = "X-Sendfile"
14
+
15
+ # For nginx:
16
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
17
+
18
+ # If you have no front-end server that supports something like X-Sendfile,
19
+ # just comment this out and Rails will serve the files
20
+
21
+ # See everything in the log (default is :info)
22
+ # config.log_level = :debug
23
+
24
+ # Use a different logger for distributed setups
25
+ # config.logger = SyslogLogger.new
26
+
27
+ # Use a different cache store in production
28
+ # config.cache_store = :mem_cache_store
29
+
30
+ # Disable Rails's static asset server
31
+ # In production, Apache or nginx will already do this
32
+ config.serve_static_assets = false
33
+
34
+ # Enable serving of images, stylesheets, and javascripts from an asset server
35
+ # config.action_controller.asset_host = "http://assets.example.com"
36
+
37
+ # Disable delivery errors, bad email addresses will be ignored
38
+ # config.action_mailer.raise_delivery_errors = false
39
+
40
+ # Enable threaded mode
41
+ # config.threadsafe!
42
+
43
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
44
+ # the I18n.default_locale when a translation can not be found)
45
+ config.i18n.fallbacks = true
46
+
47
+ # Send deprecation notices to registered listeners
48
+ config.active_support.deprecation = :notify
49
+
50
+ config.eager_load = true
51
+ end
@@ -0,0 +1,36 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Show full error reports and disable caching
11
+ config.consider_all_requests_local = true
12
+ config.action_controller.perform_caching = false
13
+
14
+ # Raise exceptions instead of rendering exception templates
15
+ config.action_dispatch.show_exceptions = false
16
+
17
+ # Disable request forgery protection in test environment
18
+ config.action_controller.allow_forgery_protection = false
19
+
20
+ # Tell Action Mailer not to deliver emails to the real world.
21
+ # The :test delivery method accumulates sent emails in the
22
+ # ActionMailer::Base.deliveries array.
23
+ config.action_mailer.delivery_method = :test
24
+
25
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
26
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
27
+ # like if you have constraints or database-specific column types
28
+ # config.active_record.schema_format = :sql
29
+
30
+ config.active_support.test_order = :random
31
+
32
+ # Print deprecation notices to the stderr
33
+ config.active_support.deprecation = :stderr
34
+
35
+ config.eager_load = false
36
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,47 @@
1
+ # Use this hook to configure merit parameters
2
+ Merit.setup do |config|
3
+ # Add application observers to get notifications any time merit changes reputation.
4
+ config.add_observer 'DummyObserver'
5
+
6
+ config.orm = ENV['ORM'].try(:to_sym)
7
+ end
8
+
9
+ # Create application badges (uses https://github.com/norman/ambry)
10
+ badge_id = 0
11
+ [{
12
+ id: (badge_id = badge_id+1),
13
+ name: 'commenter',
14
+ description: 'You\'ve participated good in our boards! (level 10)',
15
+ level: 10
16
+ }, {
17
+ id: (badge_id = badge_id+1),
18
+ name: 'commenter',
19
+ description: 'You\'ve participated great in our boards!'
20
+ }, {
21
+ id: (badge_id = badge_id+1),
22
+ name: 'visited_admin',
23
+ description: 'You sneaked in!'
24
+ }, {
25
+ id: (badge_id = badge_id+1),
26
+ name: 'has_commenter_friend',
27
+ description: 'Testing badge granting in more than one rule per action, with different targets'
28
+ }, {
29
+ id: (badge_id = badge_id+1),
30
+ name: 'relevant-commenter',
31
+ description: 'You\'ve received 5 votes on a comment.'
32
+ }, {
33
+ id: (badge_id = badge_id+1),
34
+ name: 'autobiographer',
35
+ description: 'You\'ve edited your name and it\'s above 4 characters! (?)'
36
+ }, {
37
+ id: (badge_id = badge_id+1),
38
+ name: 'just-registered'
39
+ }, {
40
+ id: (badge_id = badge_id+1),
41
+ name: 'wildcard_badge'
42
+ }, {
43
+ id: (badge_id = badge_id+1),
44
+ name: 'gossip'
45
+ }].each do |badge|
46
+ Merit::Badge.create! badge
47
+ end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,3 @@
1
+ if Rails.version >= "5.1"
2
+ Rails.application.config.active_record.belongs_to_required_by_default = true
3
+ end
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+
8
+ if Rails.version < '4'
9
+ Dummy::Application.config.secret_token = 'f00fe8e4404331c84a9f1d877217c57399e0429ed948843f5d0b5db642cb2ab2c1dc28a17ef7daeecf64b1a4f2b61f7ae4886ab993fb0d7cf65d7b64ba5fbcb1'
10
+ else
11
+ Dummy::Application.config.secret_key_base = 'f00fe8e4404331c84a9f1d877217c57399e0429ed948843f5d0b5db642cb2ab2c1dc28a17ef7daeecf64b1a4f2b61f7ae4886ab993fb0d7cf65d7b64ba5fbcb1'
12
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,13 @@
1
+ development:
2
+ sessions:
3
+ default:
4
+ database: merit_dev
5
+ hosts:
6
+ - localhost:27017
7
+
8
+ test:
9
+ sessions:
10
+ default:
11
+ database: merit_test
12
+ hosts:
13
+ - localhost:27017
@@ -0,0 +1,16 @@
1
+ Dummy::Application.routes.draw do
2
+ namespace :admin do
3
+ get '/users' => 'users#index'
4
+ end
5
+ namespace :api do
6
+ get '/users' => 'users#index'
7
+ resources :comments, only: [:show]
8
+ end
9
+ resources :users, :except => :update
10
+ resources :registrations, :only => :update, :as => :registrations_user
11
+ resources :comments
12
+
13
+ get '/comments/:id/vote/:value' => 'comments#vote', :value => /\d+/
14
+
15
+ root :to => 'users#index'
16
+ end
@@ -0,0 +1,12 @@
1
+ class CreateUsers < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :users do |t|
4
+ t.string :name
5
+ t.timestamps null: false
6
+ end
7
+ end
8
+
9
+ def self.down
10
+ drop_table :users
11
+ end
12
+ end
@@ -0,0 +1,16 @@
1
+ class CreateComments < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :comments do |t|
4
+ t.string :name
5
+ t.text :comment
6
+ t.integer :user_id
7
+ t.integer :votes, :default => 0
8
+
9
+ t.timestamps null: false
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :comments
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ class AddFieldsToUsers < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ add_column :users, :sash_id, :integer
4
+ add_column :users, :level, :integer, :default => 0
5
+ end
6
+
7
+ def self.down
8
+ remove_column :users, :sash_id
9
+ remove_column :users, :level
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class AddFieldsToComments < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ add_column :comments, :sash_id, :integer
4
+ add_column :comments, :level, :integer, :default => 0
5
+ end
6
+
7
+ def self.down
8
+ remove_column :comments, :sash_id
9
+ remove_column :comments, :level
10
+ end
11
+ end
@@ -0,0 +1,18 @@
1
+ class CreateMeritActions < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :merit_actions do |t|
4
+ t.integer :user_id # source
5
+ t.string :action_method
6
+ t.integer :action_value
7
+ t.boolean :had_errors, :default => false
8
+ t.string :target_model
9
+ t.integer :target_id
10
+ t.boolean :processed, :default => false
11
+ t.timestamps null: false
12
+ end
13
+ end
14
+
15
+ def self.down
16
+ drop_table :merit_actions
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ class CreateMeritActivityLogs < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :merit_activity_logs do |t|
4
+ t.integer :action_id
5
+ t.string :related_change_type
6
+ t.integer :related_change_id
7
+ t.string :description
8
+ t.datetime :created_at
9
+ end
10
+ end
11
+
12
+ def self.down
13
+ drop_table :merit_activity_logs
14
+ end
15
+ end
@@ -0,0 +1,11 @@
1
+ class CreateSashes < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :sashes do |t|
4
+ t.timestamps null: false
5
+ end
6
+ end
7
+
8
+ def self.down
9
+ drop_table :sashes
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ class CreateBadgesSashes < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :badges_sashes do |t|
4
+ t.integer :badge_id, :sash_id
5
+ t.boolean :notified_user, :default => false
6
+ t.datetime :created_at
7
+ end
8
+ add_index :badges_sashes, [:badge_id, :sash_id]
9
+ add_index :badges_sashes, :badge_id
10
+ add_index :badges_sashes, :sash_id
11
+ end
12
+
13
+ def self.down
14
+ drop_table :badges_sashes
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ class CreateScoresAndPoints < ActiveRecord::Migration[5.0]
2
+ def self.up
3
+ create_table :merit_scores do |t|
4
+ t.references :sash
5
+ t.string :category, :default => 'default'
6
+ end
7
+
8
+ create_table :merit_score_points do |t|
9
+ t.references :score
10
+ t.integer :num_points, :default => 0
11
+ t.string :log
12
+ t.datetime :created_at
13
+ end
14
+ end
15
+
16
+ def self.down
17
+ drop_table :merit_scores
18
+ drop_table :merit_score_points
19
+ end
20
+ end
@@ -0,0 +1,11 @@
1
+ class CreateAddresses < ActiveRecord::Migration[5.0]
2
+ def up
3
+ create_table :addresses do |t|
4
+ t.references :user
5
+ end
6
+ end
7
+
8
+ def down
9
+ drop_table :addresses
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class AddTargetDataToMeritActions < ActiveRecord::Migration[5.0]
2
+ def change
3
+ add_column :merit_actions, :target_data, :text
4
+ end
5
+ end