Ruby on Rails: Using a different controller with in_place_editor_field
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}} %>
Featured writing
When your brilliant idea meets organizational reality: a survival guide
Is your cutting-edge AI strategy being derailed by organizational inertia? Discover how to navigate the chasm between visionary ideas and entrenched corporate realities.
Server-Side Dashboard Architecture: Why Moving Data Fetching Off the Browser Changes Everything
How choosing server-side rendering solved security, CORS, and credential management problems I didn't know I had.
AI as Coach: Transforming Professional and Continuing Education
In continuing education, learning doesn’t end when the course is completed. Professionals, executives, and lifelong learners often require months of follow-up, guidance, and reinforcement to fully integrate new knowledge into their work and personal lives. Traditionally, human coaches have filled this role—whether in leadership development, career advancement, corporate training, or personal growth. However, the cost and accessibility of one-on-one coaching remain significant barriers. AI-driven coaching has the potential to bridge this gap, providing continuous, personalized support at scale.
Books
The Work of Being (in progress)
A book on AI, judgment, and staying human at work.
The Practice of Work (in progress)
Practical essays on how work actually gets done.
Recent writing
Reaction: Boredom is the new burnout, and it's quietly killing motivation at work
This article offers a fresh perspective on workplace dynamics, highlighting how boredom, often overlooked, can be as detrimental as burnout, and provides insights on redesigning work to enhance motivation and engagement.
AI Slop: The Hidden Cost of Poor Integration
This article challenges the notion that job crafting is the key to successful AI integration, offering a fresh perspective on the importance of a clear strategy to prevent chaos and enhance organizational efficiency.
Influence in the AI Era: Why Human Skills Still Matter
I read this and couldn't agree more: human skills are the linchpin in the age of AI. The article argues that while AI can automate tasks, it can't replicate empathy or the nuance of genuine human interaction. This isn't just about keeping jobs. It's about enhancing them. Empathy and leadership are not replaceable attributes; they are the catalysts for AI's true potential. Imagine a world where technology supports human connection rather than replaces it. Are we ready to embrace that vision, or will we let machines lead the way? Let's ensure the future remains human-centered.