-
-
Notifications
You must be signed in to change notification settings - Fork 258
Comparing changes
Open a pull request
base repository: crmne/ruby_llm
base: 1.7.0
head repository: crmne/ruby_llm
compare: 1.7.1
- 9 commits
- 21 files changed
- 2 contributors
Commits on Sep 10, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 3d57b9e - Browse repository at this point
Copy the full SHA 3d57b9eView commit details -
Fix namespaced model table names in upgrade generator (#398)
## Description This PR fixes issue #397 where the upgrade generator produces invalid table names for namespaced models. ## Problem When using custom model names with namespaces (like `Assistant::Chat`, `Assistant::Message`, etc.) and running the upgrade generator: ```bash rails g ruby_llm:upgrade_to_v1_7 chat:Assistant::Chat message:Assistant::Message ``` The migration would generate invalid table names like `:assistant/chats` instead of `:assistant_chats`. ## Solution The issue was that the generator was using `.tableize` which produces forward slashes for namespaced models. This has been fixed by using `.underscore.pluralize.tr('/', '_')` which properly converts namespaced model names to valid table names. ### Changes: - Added `table_name_for` helper method that correctly handles namespaced models - Added helper methods for each model type (`chat_table_name`, `message_table_name`, etc.) - Updated migration template to use the new helper methods instead of `.tableize` ## Testing Tested with namespaced models to confirm: - `Assistant::Chat` → `assistant_chats` ✓ - `Assistant::Message` → `assistant_messages` ✓ - `Assistant::ToolCall` → `assistant_tool_calls` ✓ - `Assistant::Model` → `assistant_models` ✓ Regular models continue to work as expected: - `Chat` → `chats` ✓ - `Message` → `messages` ✓ Fixes #397
Configuration menu - View commit details
-
Copy full SHA for ad036e1 - Browse repository at this point
Copy the full SHA ad036e1View commit details -
Reorganize generators to follow Rails conventions
- Move each generator into its own subdirectory - Update source paths to work from new locations - Add table_name_for helper to handle namespaced models - Fix chat_ui generator to properly handle namespaced model table names - Place private methods in conventional location at end of class
Configuration menu - View commit details
-
Copy full SHA for c811173 - Browse repository at this point
Copy the full SHA c811173View commit details -
Fix namespaced models in Model migration and foreign key migrations (#…
…399) Fixes #397 (comment) and continues work from #398
Configuration menu - View commit details
-
Copy full SHA for ecc8afa - Browse repository at this point
Copy the full SHA ecc8afaView commit details
Commits on Sep 11, 2025
-
Improve upgrade generator and add troubleshooting docs
- Fix instance variable usage in migration template - Fix generators when using namespaced models - Simplify upgrade instructions to point to migration guide - Add troubleshooting section for acts_as_model error from issue #400 - Add warning about acts_as_model error directly in generator output - Create initializer if missing during upgrade - Use consistent helper methods across install and upgrade generators
Configuration menu - View commit details
-
Copy full SHA for 552732c - Browse repository at this point
Copy the full SHA 552732cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a5ad13 - Browse repository at this point
Copy the full SHA 1a5ad13View commit details -
Add automatic acts_as declaration updates to upgrade generator
- Upgrade generator now automatically rewrites existing models' acts_as declarations - Updates Chat, Message, and ToolCall models to include proper model associations - Create shared GeneratorHelpers module to DRY up generator code - Add automatic namespace module creation with table_name_prefix for namespaced models - Fix template paths in upgrade generator to use source_paths correctly - Update docs to highlight automatic acts_as updates as key feature - Delete implementation detail tests that check source code strings
Configuration menu - View commit details
-
Copy full SHA for 939d532 - Browse repository at this point
Copy the full SHA 939d532View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd3dfc5 - Browse repository at this point
Copy the full SHA cd3dfc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ee02d0 - Browse repository at this point
Copy the full SHA 6ee02d0View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 1.7.0...1.7.1