rlogwood
Joined
Activity
FWIW, this is working in 6.1.4 (see my comment https://github.com/rails/rails/issues/36374#issuecomment-877695770)
To config/application.rb
add:
config.active_storage.replace_on_assign_to_many = false
This is really cool, much appreciated!!! I made a typo which took me a minute to resolve <AllowHeaders>
instead of <AllowedHeaders>
. I'm on a template kick and put this video into one here: https://github.com/rlogwood/rails_addons.
This works, a link styled as a button:
<% if form.object.persisted? %>
<%= link_to "Delete", tweet_path(tweet), method: :delete, class: "btn btn-outline-danger", data: {confirm: 'Confirm deletion?'} %>
<% end %>
Working these videos late, I failed to realize my timezone is different from the rails default. You can set your time zone in config/application.rb
.
For example:
config.time_zone = "Eastern Time (US & Canada)"
There is a lot written about automatic detection of time zones:
GoRails.com search
https://gorails.com/episodes/forum-time-zones-with-local_time
https://gorails.com/episodes/auto-detect-user-time-zones-in-rails
Other search results
https://stackoverflow.com/questions/6280872/auto-detect-users-timezone-using-his-ip-in-rails
Try generating a standalone twitter app with v1.1 access (note from Twitter: Standalone Apps live outside of Projects. This means that they can’t use the the most current v2 Twitter API endpoints.). Generate the new api key and secret for the v1.1 app and use those in your credentials:edit step. See cristiano's answer.
To make this work I had to also create a standalone app, that only has v1.1 access, as described in cristiano's post above. To verify that things work outside of twitter you can use the "developer" strategy: provider :developer unless Rails.env.production? (see omniauth docs) then perform a post request to /auth/developer
It might make sense to remove the old version([OLD] Rails for Beginners Part 24: OmniAuth URLs) from the playlist on YouTube, I got bogged down thinking I had a problem with my setup, stopping at this video and trying a number of things to debug before finding this thread. Playing in full screen mode, I don't notice the titles, but they are there. Next time I'll read the title and try the forums :)