Closed lundie closed 11 months ago
Hi,
I am attempting the following:
class Member < ApplicationRecord # application_layout :jsonb typed_store :application_layout do |s| s.string :tabs, default: ["company_information", "company_history", "company_contacts", "company_references", "banking_information"], array:true, null: false s.string :page_title_en, default: "My Online Form" end
Then running in the console:
m = Member.new m.tabs (which returns a blank array []) m.pate_title_en (returns the title "My Online Form").
I can set the value of the array after the fact and it works.
Is there a way to default the values of the array?
Thanks :)
Weird, this should work. Sounds like a bug.
Just ran into this bug too. It ignores my default: and initializes with an empty array instead.
default:
Hi,
I am attempting the following:
Then running in the console:
I can set the value of the array after the fact and it works.
Is there a way to default the values of the array?
Thanks :)