### Install inertia_rails-contrib Gem Source: https://github.com/skryukov/inertia_rails-contrib/blob/main/README.md Instructions for installing the inertia_rails-contrib gem using Bundler or directly via gem install. This adds the gem to your application's dependencies. ```bash $ bundle add inertia_rails-contrib ``` ```bash $ gem install inertia_rails-contrib ``` -------------------------------- ### Render Modal in Controller Action Source: https://github.com/skryukov/inertia_rails-contrib/blob/main/README.md Example of how to use the `inertia_modal` render method in a Rails controller action to display a component in a modal. It specifies the component name, props, and an optional base URL for routing. ```ruby class PostsController < ApplicationController def new render inertia_modal: 'Post/New', props: { post: Post.new }, base_url: posts_path end end ``` -------------------------------- ### Enable InertiaUI Modal Support Source: https://github.com/skryukov/inertia_rails-contrib/blob/main/README.md Configuration snippet to enable InertiaUI Modal support within your Rails application. This involves setting an initializer option to true, which then provides the `inertia_modal` render method. ```ruby InertiaRailsContrib.configure do |config| config.enable_inertia_ui_modal = true end ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.