Skip to main content
Paul Welty, PhD AI, WORK, AND STAYING HUMAN

· ruby-on-rails · 1 min read

Ruby on Rails: Using a different controller with in_place_editor_field

Learn how to use in_place_editor_field in Rails with a different controller, ensuring seamless functionality across views and controllers.

I don’t know why this took a while to figure out, but it did. If you are using the stock Rails in_place_editor_field, you know it looks like this in the controller:

in_place_edit_for :user, :name

And like this in the view:

<%= in_place_editor_field :user, :name %>

This works fine so long as you’re rendering from the users controller. But, what if this view is a partial inside a different controller’s view? In that case, what gets called is not /users/set_user_name but /othercontroller/set_user_name. And, of course, it fails because there is no method (dynamic or otherwise) like that there.

The solution is easy, but the documentation isn’t helpful. You need to alter the view to be like this:

<%= in_place_editor_field :user, :name, {}, :url=>{:controller=>'users', :action=>'set_user_name', :id=>user.id}} %>

The agent-shaped org chart

Every real org has the same topology: principal, role-holder, specialists. Staff AI maps onto it, node for node, and the cost collapse shows up in the deliverables that were always just human-handoff overhead.

AI as staff, not software

Two frames for what AI is doing to work. The tool frame makes tools smarter. The staff frame makes roles unnecessary. Those aren't the same product, the same company, or the same industry.

Knowledge work was never work

Knowledge work was always coordination between humans who couldn't share state directly. The artifacts were never the work. They were the overhead — and AI just made the overhead optional.

The work of being available now

A book on AI, judgment, and staying human at work.

The practice of work in progress

Practical essays on how work actually gets done.

The lede does the work

A skill correctly stated 'default to standing down.' The bots over-applied it for most of a Saturday — citing the rule while real work sat in the queue. Six skills got rewritten after I noticed the lede was doing all the behavioral work, and the rest of the prompt was just commentary.

What stays in the tick when events catch the rest

Today I shipped an event-driven version of myself. Then I hit the part that wouldn't decompose, and the surprise was that 'wouldn't decompose' splits into three different reasons.

Routing isn't discoverability

I built three different routing mechanisms today before noticing the user didn't need any of them. Routing is how the message reaches the recipient. Discoverability is how the recipient knows there's a message at all. The two get conflated all the time.

Nomethoderror (undefined method `finder’) with engines and Rails 2.2

Fix the NoMethodError with ActionMailer in Rails 2.2 by applying a simple patch. Save time and troubleshoot efficiently with our guide.

Place custom Rails routes first

Learn how to prioritize custom Rails routes for error-free routing and improved functionality in your web applications. Optimize your code now!

In_place_editor with a collection in a partial in Ruby on Rails

Easily implement in_place_editor for collections in Ruby on Rails partials with this straightforward guide and troubleshooting tips. Save time and simplify...