Ruby Developer Guide
Other documentationsDemoCommunityGitHub
  • Forest Admin
  • Getting started
    • How it works
    • Quick start
      • Ruby on Rails
    • Create your agent
    • Troubleshooting
    • Migrating legacy agents
      • Pre-requisites
      • Recommendations
      • Migration steps
      • Code transformations
        • API Charts
        • Live Queries
        • Smart Charts
        • Route overrides
        • Smart Actions
        • Smart Fields
        • Smart Relationships
        • Smart Segments
  • Data Sources
    • Getting Started
      • Collection selection
      • Naming conflicts
      • Query interface and Native Queries
        • Fields and projections
        • Filters
        • Aggregations
    • Provided data sources
      • ActiveRecord
        • Polymorphic relationships
      • Mongoid
    • Write your own
      • Translation strategy
        • Structure declaration
        • Capabilities declaration
        • Read implementation
        • Write implementation
        • Intra-data source Relationships
      • Contribute
  • Agent customization
    • Getting Started
    • Actions
      • Scope and context
      • Result builder
      • Static Forms
      • Widgets in Forms
      • Dynamic Forms
      • Form layout customization
      • Related data invalidation
    • Charts
      • Value
      • Objective
      • Percentage
      • Distribution
      • Leaderboard
      • Time-based
    • Fields
      • Add fields
      • Move, rename and remove fields
      • Override binary field mode
      • Override writing behavior
      • Override filtering behavior
      • Override sorting behavior
      • Validation
    • Hooks
      • Collection hook
      • Collection override
    • Pagination
    • Plugins
      • Write your own
    • Relationships
      • To a single record
      • To multiple records
      • Computed foreign keys
      • Under the hood
    • Search
    • Segments
  • Frontend customization
    • Smart Charts
      • Create a table chart
      • Create a bar chart
      • Create a cohort chart
      • Create a density map
    • Smart Views
      • Create a Map view
      • Create a Calendar view
      • Create a Shipping view
      • Create a Gallery view
      • Create a custom tinder-like validation view
      • Create a custom moderation view
  • Deploying to production
    • Environments
      • Deploy on AWS
      • Deploy on Heroku
      • Deploy on GCP
      • Deploy on Ubuntu
    • Development workflow
    • Using branches
    • Deploying your changes
    • Forest Admin CLI commands
      • init
      • login
      • branch
      • switch
      • set-origin
      • push
      • environments:create
      • environments:reset
      • deploy
  • Under the hood
    • .forestadmin-schema.json
    • Data Model
      • Typing
      • Relationships
    • Security & Privacy
Powered by GitBook
On this page
  • Step 1: Remove the previous agent
  • Step 2: Install the new agent
  • Step 3: Customization

Was this helpful?

  1. Getting started
  2. Migrating legacy agents

Migration steps

This is the official documentation of the agent_ruby Ruby agent.

Step 1: Remove the previous agent

Settings

Please keep your FOREST_ENV_SECRET before deleting the old agent. You will need it to configure the new one. You can find it in you config/secrets.yml file.

# uninstall the old agent
bundle remove forest_liana
# remove the old configuration files
rm -f config/initializers/forest_liana.rb
rm -f config/secrets.yml

Route configuration

Remove the 'ForestLiana' route from your config/routes.rb file.

# remove this line
mount ForestLiana::Engine => '/forest'

Cache

The previous agent required cache to be activated in development mode. This is no longer necessary with the new agent. You can disable it with the following command:

rails dev:cache

Step 2: Install the new agent

add the following line to your Gemfile:

gem "forest_admin_rails", "~> 1.0.0.pre.beta.75"
gem "forest_admin_agent", "~> 1.0.0.pre.beta.75"
gem "forest_admin_datasource_toolkit", "~> 1.0.0.pre.beta.75"
gem "forest_admin_datasource_active_record", "~> 1.0.0.pre.beta.75"
gem "forest_admin_datasource_customizer", "~> 1.0.0.pre.beta.75"

Then run:

rails g forest_admin_rails:install FOREST_ENV_SECRET

Step 3: Customization

PreviousRecommendationsNextCode transformations

Last updated 7 months ago

Was this helpful?

Previously, to customize a SmartAction, you set it for each model lib/forest_liana/collections/ and app/controllers/forest/ directories. Now, you set it in the app/lib/forest_admin_rails/create_agent.rb file. You will find more information in the on moving your previous SmartAction customizations to the new agent.

dedicated section