Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

jpfuentes2 (at gmail)'s latest activity

Monday, December 06 2010
5322 Rails3 RC - AREL does not work with multiple schemas using MySQL was updated in Ruby on Rails
  • jpfuentes2 (at gmail)
    jpfuentes2 (at gmail) commented at 3:23 PM

    FYI, when I last looked into this problem, the issue is that AREL doesn't think the table exists when you do a create - for some reason it does not have the oth...

Friday, October 22 2010
5307 Module table_name_prefix not respected for using set_table_name was updated in Ruby on Rails
  • jpfuentes2 (at gmail)
    jpfuentes2 (at gmail) commented at 6:50 PM

    Here's the new patch applied to edge (master). You are right about the 1st case, it was not working in rails 3 pre, but is working now with 3.0.0 and 3.0.1.

Thursday, October 21 2010
5307 Module table_name_prefix not respected for using set_table_name was updated in Ruby on Rails
  • jpfuentes2 (at gmail)
    jpfuentes2 (at gmail) commented at 6:54 PM

    (on Rails 3.0.1)

    To be clear on #1 the module's table_name_prefix is ignored because rails simply uses the module's name instead of the provided prefix:

    module...
Saturday, August 07 2010
5307 Module table_name_prefix not respected for using set_table_name was updated in Ruby on Rails
  • jpfuentes2 (at gmail)
    • Tag changed from 3.0.0.rc, active_record, set_table_name, table_name_prefix to 3.0.0.rc, active_record, patch, set_table_name, table_name_prefix
    by jpfuentes2 (at gmail) at 11:06 PM

    Including a patch to fix #2. set_table_name now accepts :prefix option like so

    module Testing
      def self.table_name_prefix
        'prefix_'
      end
    end
    
    class Testi...
  • jpfuentes2 (at gmail)
    jpfuentes2 (at gmail) commented at 10:07 PM

    As far as 1 is concerned, it seems like it has something to do with autoloading models. When I do the following, the prefix is respected:

    module Testing
      def ...
Friday, August 06 2010
5322 Rails3 RC - AREL does not work with multiple schemas using MySQL was updated in Ruby on Rails
  • jpfuentes2 (at gmail)
    jpfuentes2 (at gmail) commented at 9:59 PM

    Update: apparently the issue is with creating records. I can issue a find for either model on both schemas:

    When I put in this test.rb

    p User.columns
    p Post.co...
  • jpfuentes2 (at gmail)
    jpfuentes2 (at gmail) created the ticket at 9:00 PM

    gem 'rails', '3.0.0.rc'
    gem 'mysql'

    When using multiple schemas in AR models, AREL throws an error whenever I try to use a schema other than the one specified i...

Thursday, August 05 2010
5307 Module table_name_prefix not respected for using set_table_name was created in Ruby on Rails
  • jpfuentes2 (at gmail)
    jpfuentes2 (at gmail) created the ticket at 3:32 PM

    Using rails 3.0.0.rc

    A module's table_name_prefix method is not respected in two cases:

    1) vanilla - the prefix is ignored and uses pluralized module name
    2) wh...