Support for custom object inside of .builder views
4 views
Skip to first unread message
lancecarlson
unread,
Aug 27, 2019, 12:52:51 PM8/27/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Core
My use case:
I have a project that uses the twilio-ruby gem's Tiwml library to generate XML. At the moment I put all of the syntax for generating the XML inside of the controller and render that manually. This seems off to me as the controller should be responsible for controlling small amounts of business logic and the view should be generating the XML. Is there a way to inject your own Ruby or builder object into .builder templates? If not, should this be a feature?