
Nick McNeany
Joined
Activity
Rails 6 & Bootstrap 5 update
Installing packages
Bootstrap and jQuery can stay the same, although Bootstrap 5 doesn't use jQuery anymore so it's actually not needed for this.
-
javascript yarn add @popperjs/core
instead of
yarn add popper.js
Importing bootstrap into application.js
import * as bootstrap from 'bootstrap'
Selecting all tooltips
document.addEventListener('turbolinks:load', () => {
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
})
Note: as mentioned above the data attribute has changed data-bs-toggle="tooltip
. You can do the same thing for popovers.
Thanks Chris!
Posted in New Design!
Chris, I think you nailed it this time! Every time you roll out a new site design, it's better than the previous.
Great job!
Nick
Posted in Google Maps and Google Places Autocomplete API with Rails, Turbolinks, and Stimulus.js Discussion
Awesome episode Chris!
Would love to see more on Stimulus!
Absolutely agree!
Chris is the man! Thanks for all the hardwork, I've learned a lot over the last 4 years!
Posted in Symbols vs Strings Discussion
Great episode, Chris! Love the basics/beginner genre!
Great epiode Chris! Would love to see more like this!
Posted in New Site Design!
Chris! The new site looks awesome! Great work!
Haha!!!
Makes total sense. Thanks for the quick response Chris! You're the man!
Hey everyone,
Quick question (I hope). I have an application with Devise's out-of-the-box initial set-up. Later, I realized I wanted to include the Trackable functionality so I included it in my model, and uncommented out the Trackable section in the migration file. When I run rails db:migrate
nothing happens.
Is this not an acceptable way to do this? Should I run a separate migartion to add the columns I need?
Thanks of the help!
Nick
I'd love to see more of these. I'm using Hatch and loving it, I just don't think I'm using it to it's full potential.
I think a series of setting up and configuring different features would be cool!
Also, I like the new commenting system. I just finished mine yesterday. Did you use the Ancestry gem for nesting?
Posted in Layout for Devise with scoped route
Hey Jacob,
Thanks for the help! Unfortunately I still can't get the layout to display. I think I'm just going to move onto plan b for now.
I really appreciate your help!
Nick
Great video Chris! I'm loving this series!
Posted in Layout for Devise with scoped route
Hey Everyone,
I'm trying to use a custom layout for my devise/registrations#edit
view. I'm using a scoped route.
devise_scope :member do
get "/members/:id/settings" => "devise/registrations#edit", as: "edit_member_registration"
end
I call the layout in my registrations controller layout "member_area", only: :edit
, but it's not showing.
I have a feeling it has to do with the scoped route. Also, if I take off the only: :edit
the layout shows up on the other registration pages as expected.
Anyone have any thoughts on this?
Thanks for any help!
Nick
Awesome, Thanks for the update and resources @Damian!
Another cool idea, would be the ability to update the map with locations near a user based on their location/ip address, either automatically or with a manual reload. I know this is difficult to do in development, but would love to see this.
Awesome episode! Really enjoying the maps and geolocation episodes!
Thanks, Chris!
Haha, I know, right!!!
Actually, in the Stripe Elements screencast you use a form_tag
because you're using Rails 5.1.0. You attempt to use the form_with
, realize you can't and then move on with the form_tag
.