class FixDangerousAttributes
Public Class Methods
down()
click to toggle source
# File lib/generators/tkh_search/create_or_update_migrations/templates/fix_dangerous_attributes.rb, line 11 def self.down rename_column :tkh_search_instances, :host_model_name, :model_name rename_column :tkh_search_results, :host_model_name, :model_name end
up()
click to toggle source
ActiveRecord raises an exception if some model attributes use the same word as some AR methods or attributes.
# File lib/generators/tkh_search/create_or_update_migrations/templates/fix_dangerous_attributes.rb, line 6 def self.up rename_column :tkh_search_instances, :model_name, :host_model_name rename_column :tkh_search_results, :model_name, :host_model_name end