August 2025
Intermediate to advanced
270 pages
6h 16m
English
First, create a new route in the Rails app that points to an Android version of path configuration.
| | Rails.application.routes.draw do |
| | # ... |
| | |
| | resources :configurations, only: [] do |
| | get :ios_v1, on: :collection |
| » | get :android_v1, on: :collection |
| | end |
| | end |
Open ConfigurationsController.rb and copy-paste the body of ios_v1 into a new method, android_v1.
| | class ConfigurationsController < ApplicationController |
| | def ios_v1 |
| | # ... |
| | end |
| | |
| » | def android_v1 |
| » | render json: { |
| » | settings: {}, |
| » | rules: [ |
| » | { |
| » | patterns: [ |
| » | "/new$", |
| » | "/edit$" |
| » | ], |
| » | properties: { |
| » | context: "modal" ... |
Read now
Unlock full access