bullet-train-co / bullet_train

The Open Source Ruby on Rails SaaS Template
MIT License
1.63k stars 257 forks source link

Getting a translation error for an 'option' picker #645

Closed TheColorPlum closed 1 year ago

TheColorPlum commented 1 year ago

Hello, I'm getting started with Bullet Train and I'm testing out creating a simple crud model that has name:text_field and category:options. When trying to create one of these I get the following error:

ActionView::Template::Error (translation missing: en.strengths.fields.category.options):

And am not sure why. Any tips on where to check / how to fix?

gazayas commented 1 year ago

Hello @TheColorPlum, I used the following commands and was able to Super Scaffold options without any errors:

rails g model Foo team:references name:string category:string
bin/super-scaffold crud Foo Team name:text_field category:options

You can read the field partial docs in case you have any mismatches between your model's data types and our field partial types.

create option

created option

TheColorPlum commented 1 year ago

Ah I see, I had the wrong data type for the original category model. Thanks for the quick response!