Ruby on Rails Wednesday, January 11, 2017

As stated in #8934, using Anonymous Classes are not supported. That said, IF I were to use an anonymous class, what suggestions and concerns would you have? This is how I am using it currently

tempConnection = Class::new(ActiveRecord::Base) do      def         @name      end  end  tempConnection.instance_variable_set("@name","#{params[:database]}#{params[:table]}")  config = tempConnection.connection_config.clone  config[:database] = params[:database]  tempConnection.table_name = params[:table]  tempConnection.establish_connection(config)

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment