Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with ActionText::RichText #154

Open
mhenrixon opened this issue Apr 17, 2021 · 3 comments
Open

Not working with ActionText::RichText #154

mhenrixon opened this issue Apr 17, 2021 · 3 comments

Comments

@mhenrixon
Copy link

These are the values generated from db:seed:dump. It seems like the ActionText::Content isn't dumped correctly.

ActionText::RichText.create!([
  {name: "excerpt", body: #<ActionText::Content "<!-- BEGIN vendor/bund...">, record_type: "Article", record_id: 1},
  {name: "content", body: #<ActionText::Content "<!-- BEGIN vendor/bund...">, record_type: "Article", record_id: 1},
  {name: "excerpt", body: #<ActionText::Content "<!-- BEGIN vendor/bund...">, record_type: "Article", record_id: 2},
  {name: "content", body: #<ActionText::Content "<!-- BEGIN vendor/bund...">, record_type: "Article", record_id: 2},
  {name: "description", body: #<ActionText::Content "<!-- BEGIN vendor/bund...">, record_type: "Announcement", record_id: 1},
  {name: "excerpt", body: #<ActionText::Content "<!-- BEGIN vendor/bund...">, record_type: "Article", record_id: 3},
  {name: "content", body: #<ActionText::Content "<!-- BEGIN vendor/bund...">, record_type: "Article", record_id: 3}
])
@pkemble
Copy link

pkemble commented Apr 19, 2021

Same here.
Rails 6.1.1
Ruby 3.0.0p0
seed_sump 3.3.1

ActionText::RichText.create!([ {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 377}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 254}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 255}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 256}, {name: "content", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Post", record_id: 257}, ...

@Spone
Copy link

Spone commented Oct 25, 2021

You can try this branch: https://github.com/Spone/seed_dump/tree/actiontext-support

@brunnopleffken
Copy link

brunnopleffken commented Jul 1, 2024

It's not working with ActionText. Even if I pass the models with the data I want to export, for example:

rails db:seed:dump models=Category,City,State --trace

None of these models have has_rich_text. It returns the error:

** Invoke db:seed:dump (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:seed:dump
bin/rails aborted!
ActiveRecord::Encryption::Errors::Configuration: Missing Active Record encryption credential: active_record_encryption.primary_key (ActiveRecord::Encryption::Errors::Configuration)

And by the way, my encryption credentials are OK. My seeds.rb file gets stuck like this:

Screenshot 2024-07-01 at 19 15 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants