In order to render a new partial without being a “Rails” object we can rewrite the method to_partial_path to do so:
| |
Now we just need to create the view in app/views/timeline/_timeline.htm.erb and it’s going to work like a charm!
or, we can extend the ActiveModel::Naming to make it works as well:
| |
Happy coding!