Activity
That was wild. https://media.giphy.com/media/MUeQeEQaDCjE4/giphy.gif
Posted in How to use Hotwire in Rails Discussion
I love how clearly excited Chris is about this, trying not to crack a huge smile every other minute! There's nothing like listening to someone talk about what they're passionate about :)
Posted in Bulk Operations in Rails Discussion
Nice!
Great lesson, thanks Chris!
I am using this gem and it's been going great, but after implementing it I ran my tests and they all fail with the message:
Jumpstart::AccountsTest::AdminUsers#test_can_edit_account:
NoMethodError: undefined method jsonb_accessor' for #<Class:0x00007f84226d5dc8>
class:Account'
app/models/account.rb:51:in
app/models/account.rb:29:in `'
Any ideas on why might be causing this or how to fix it? Thanks!
Loved this series @Chris! Can you share the one line of code you used to import records from a CSV? Did you have to do anything special to export the records from the old app to a CSV? Thanks!
Did you ever have any luck with this? I'm having a similar problem.
Posted in Global Autocomplete Search Discussion
I am getting an error when I run the finished code: search.js:31 Uncaught TypeError: $input.easyAutocomplete is not a function
However, when I put create an options variable directly in the console and run:
$input = $("[data-behavior='autocomplete']")
and then
$input.easyAutocomplete(options)
it works fine. Any idea why I am able to run easyAutocomplete directly in the console but not in the normal course of my app? Here is my application.js file:
// Rails functionality
window.Rails = require("@rails/ujs")
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
require("trix")
require("@rails/actiontext")
require("jquery")
require("easy-autocomplete")
require("custom/show")
require("custom/search")
// Tailwind CSS
import "stylesheets/application"
// Stimulus controllers
import "controllers"
// Jumpstart Pro & other Functionality
import "src/actiontext"
import "src/confirm"
import "src/direct_uploads"
import "src/forms"
import "src/timezone"
import "src/tooltips"
import LocalTime from "local-time"
LocalTime.start()
// ADD YOUR JAVACSRIPT HERE
// Start Rails UJS
Rails.start()
Any ideas on this? Thanks!
So I ended up wrapping each piece of each migration in safety_assured { } as strong_migration found errors, which eventually got all of them to run. Seems like it is a known error - https://github.com/mbleigh/acts-as-taggable-on/issues/985
Awesome video, love the concept for this series and having a chance to watch you think :)
Anyone else having any issues using acts-as-taggable-on along with strong_migrations? Running rake db:migrate after installing acts-as-taggable-on is aborting the migration and throwing this error:
== 20200523200130 AddMissingUniqueIndices: migrating ==========================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
=== Dangerous operation detected #strong_migrations ===
Adding an index non-concurrently locks the table. Instead, use:
class AddMissingUniqueIndices < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
add_index :tags, :name, unique: true, algorithm: :concurrently
end
end
/Users/JAckerman/Documents/webdev/orgchart/db/migrate/20200523200130_add_missing_unique_indices.acts_as_taggable_on_engine.rb:9:in `up'
Thanks!
Posted in Soft Delete with Paranoia Discussion
@ya na yandex thanks!
Posted in Soft Delete with Paranoia Discussion
Is this gem still the best practice for soft deleting records?
Posted in how to build custom admin area
I am a big fan of the active_admin
gem, check it out here: https://activeadmin.info/