Internal API • × : ػೳతʹΓͳ͍͕࣌͋Δ (ؔ࿈ (Nesting) ) • : ࣗલ࣮ → ݻ༗ͷෳࡶ͞ͷݩ ActiveModel ϕʔε class ApplicationModel include ActiveModel::Model include ActiveModel::Attributes end
= Admin::User.new end def create @admin_user = Admin::User.new(admin_user_create_params) if @admin_user.save redirect_to @admin_user else render :new end end def edit @admin_user = Admin::User.new(user: ::User.find(params[:id])) end def update @admin_user = Admin::User.new(admin_user_update_params) if @admin_user.save redirect_to @admin_user else render :edit end end # … end