-
Notifications
You must be signed in to change notification settings - Fork 61
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
Missing partial rails_admin/main/_form_globalize_tabs in ruby 3 #43
Comments
Hi, @raelgc did you got any luck with this? |
No luck, same issue with rails 7 too. Basically I've got ride of this gem and, as in our project we have only 1 admin, we've are leaving now with the raw i18n entries. |
Since Right now I have the form showing BUT the issue that I have right now is that it doesn't update my translation fields when saving the form. Do you have an idea of what I need to change to make my nested form updates the fields? <%# create a file app/views/rails_admin/main/_form_globalize_tabs.html.erb and put the code below %>
<div class="controls">
<ul class="nav nav-tabs" role="tablist" style="margin-top:5px">
<% field.tabs.each do |tab| %>
<li class="nav-item" role="presentation">
<button class="nav-link<%= (" active" if tab.active?) %><%= " text-danger" unless tab.valid? %>" id="<%= tab.label %>-tab" data-bs-toggle="tab" data-bs-target="#<%= tab.label %>" type="button" role="tab" aria-controls="<%= tab.label %>" aria-selected="true"><%= tab.label %></button>
</li>
<% end %>
</ul>
</div>
<div class="tab-content">
<% field.tabs.each do |tab| %>
<%= form.fields_for field.name, tab.translation, wrapper: false do |f| %>
<div class="tab-pane fade<%= (' show active' if tab.active?) %> fields" id="<%= tab.label %>" role="tabpanel" aria-labelledby="<%= tab.label %>-tab">
<%= f.generate(action: :nested, model_config: field.associated_model_config, nested_in: field) %>
</div>
<% end %>
<% end %>
</div> |
I don't have this issue. All those methods are being triggered when I put breakpoints and it's all good. Probably you missed something in configuration file? My problem is that even with those methods working good and my template showing correctly, the here's my configuration
class Category < ApplicationRecord
# ...
translates :eligible, :name
accepts_nested_attributes_for :translations, allow_destroy: true
# ...
end
RailsAdmin.config do |config|
# ...
config.included_models = %w(Category Category::Translation)
config.model 'Category' do
configure :translations, :globalize_tabs
end
# ...
end |
While using:
3.1.2
6.1.7
3.0.0
1.2.0
I'm getting the following error while trying to edit any model:
The text was updated successfully, but these errors were encountered: