Allows you to use tables with the dashing framework.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PostRepresenter | |
include Representer | |
using Representer | |
def basic(post) | |
select(post, :id, :name) | |
end | |
def details(post) | |
basic(post) & comments(post) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['capybara/poltergeist', 'capybara/webkit', 'selenium/webdriver'].each do |d| | |
begin | |
require d | |
rescue LoadError | |
end |
This guide will walk you through adding a ChatGPT-like messaging stream to your Ruby on Rails 7 app using ruby-openai, Rails 7, Hotwire, Turbostream, Sidekiq and Tailwind. All code included below!
Want more content like this, for free? Check out my free book, RailsAI!
- Follow me on Twitter for more Ruby AI at https://twitter.com/alexrudall
- Released under the MIT License - use as you wish :)