Fixtures and non standard table_names

I was wondering if there is any way to use fixtures for this setup
without modifiying the fixtures.rb file.
I’m using ‘modules’ for all my controllers, models and also for my
fixtures. E.g. my directory structure looks like this for example for
my site menus:

  • controllers
    • site <= this I call ‘module’
      • menus_controller.rb <= the classname is: Site::MenusController
  • models
    • site
      • menu.rb <= the classname is: Site::Menu and the tablename
        site_menus (set via set_table_name)
  • fixtures
    • site
      • menus
        I could not figure out how to get this work with fixtures and testing.
        Right now I had to modifiy fixtures.rb file so I can pass table_name,
        class_name and fixtures_file_path in order to create my fixtures for

Is there any better way to do this?

Thanks, Daniel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs