Activity
Posted in How to Deploy Rails to Render Discussion
haha you had me up to docker. I don't use docker. Have you tried going down this route? - https://render.com/docs/docker
Posted in How to Deploy Rails to Render Discussion
Yeah should do, it works locally?
Posted in How to Deploy Rails to Render Discussion
do you have the yarn build as part of your build commands?
Posted in How to Deploy Rails to Render Discussion
Great video, thanks Collin!
Did you ever find a solution to this Mike? Having the same problemo
Well this couldn't have come at a better time! Thanks Chris!!! I'll be hiding the UI for creating and editing roles and providing at a higher price plan, there's a lot of value in this
Posted in Dropzone with Shrine
I just switched to shrine as Active Storage doesn't support custom file paths. At my day job a question on security assessments requires blob storage to have some sort of tenant separation and i thought it would be useful to set it up for my project.
Has anyone had any luck connecting shrine and dropzone js? I wasn't able to pass the value via the stimulus controller via an update action. How could you take exactly what would have been submitted from the file_field and submit via ajax?
Posted in Go Rails Youtube videos not loading
Working fine in incognito mode, thanks for that! I'll have to experiment with my chrome plugins and see what's blocking it.
Posted in Go Rails Youtube videos not loading
Hey @Chris, getting a playback error on the youtube player vids. Message templates vid is an example, there were some Shrine ones that weren't working either.
Posted in Hotwire Modal Forms Discussion
This is ace. Good to know you can re-render a partial as you go, it would be cool to see some other examples of this.
Posted in Remote form - update partial in Rails 6
Thanks Chris! I've been playing around with a Stimulus Controller to do this and it works great! Good to know it's an ok pattern to use. I have been watching DHH's tweets with anticipation of NEW MAGIC, looking forward to seeing what this sorcery is!
Posted in Remote form - update partial in Rails 6
This may sound super dumb but is there a new and improved way to remotely update partials in Rails 6. I've used the 'update.js.erb' file before to render the partial but for rails 6 is there an updated pattern or best practice we should be following?
I have a dynamic form im using to create 'sections' within a checklist with one field of 'title' - this also dynamically creates new tabs. I then want to use that input to re name the title of the tab and tab panel. I'm using data-targets and a stimulus controller to do this and it works beautifully, if I only create one section, but any more than one section and it doesn't rename anything. Is there something I can use to pass a unique identifier with the dynamic inputs to use elsewhere?
Hi Samantha,
I've used and adjusted the tabs from chris' stimulusjs-components to make my own wizard form. You can't currently target a tab using a href/id but this is something Chris will consider adding (i will add a issue for this). Not sure if this helps...
Posted in Richtext with Nested Attributes in form
This may have been covered but i've got a form with a nested attribute, which I want to include a rich text form with trix/action text. When submitting the form rails all of a sudden ignores the "fields_for" and tries to associate the attribute to the parent record. It works fine with a normal text_area. Has anyone been able to find a fix?
I have an activity feed (thanks Chris for the lesson) and I would like my users to be able to search the feed for search terms. The activity is created on a nested record. Is there a way to search my using the dynamic polymorphic type to find the model? Maybe by defining the search data?
Ok, just solved my own problem. For anyone else wanting to turn radio buttons into actual buttons using CSS there's a 'focus-within' class used to target child elements. I'll probably move away from 'buttons' and use a custom card but here's a solution, just wrap it in a div within the collection block.
<%= form.collection_radio_buttons :event_type_id, EventType.all, :id, :event_type do |b| %>
div class="btn btn-primary text-white checked:bg-white focus-within:bg-white">
<%= b.radio_button class: "opacity-0" %>
<%= b.label class: "" %>
/div>
<% end %>
I've been able to use Tailwind to change my radio buttons into normal buttons.
changing the background on 'hover' works, same with 'active' (on click) but there's no setting for 'checked'. Has anyone had any luck building a custom class variant for 'checked' ??
Thanks @chris. I was using Rails API and would have had to pass the tenant into the JWT which wasn't obvious and created complexity. I have bought a jumpstart license and have already built 1.5 modules in 3 days on what took me 1.5 months last time. I'm throwing away 6 months of code but gaining huge amounts of productivity.
It would be great to get a video on creating an autocomplete search with stimulus if you're short of ideas :)