I18n inheritance #873

Closed
wants to merge 2 commits into from

4 participants

@Arjeno

This pull requests adds support for I18n model inheritance. Example setup;

en:
  formtastic:
    labels:
      group:
        title: "Your Title"
class Group < ActiveRecord::Base
end
class Company < Group
end
<%= semantic_form_for Company.new do |f| %>
  <%= f.inputs do %>
    <%= f.input :title %>      # => :label => "Your Title"
  <% end %>
<% end %>
@Arjeno

It's been 3 months now, any update? :)

@justinfrench
Owner

This seems okay, anyone care to +1?

@sobrinho
Collaborator

Seems okay :)

@the8472

Instead of using .base_class and generating a range of ancestors you might want to check if the class supports .lookup_ancestors, see http://apidock.com/rails/ActiveModel/Translation/lookup_ancestors

For the general proposal of supporting inheritance: +1

@justinfrench
Owner

@Arjeno or someone else: any chance you can get this across the line with @the8472's suggestion

@justinfrench

Closing due to lack of inactivity, would love it if @the8472 or @Arjeno could still make this happen :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment