Jason Ackerman

Joined

2,590 Experience
25 Lessons Completed
0 Questions Solved

Activity

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>
app/models/account.rb:51:in
class:Account'
app/models/account.rb:29:in `'

Any ideas on why might be causing this or how to fix it? Thanks!

Posted in Building AnimatedGif.me Part 3 Discussion

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!

Posted in Building AnimatedGif.me Part 1 Discussion

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

Posted in Building AnimatedGif.me Part 1 Discussion

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/

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.