lib/avo/base_resource.rb in avo-2.1.1 vs lib/avo/base_resource.rb in avo-2.1.2.pre1

- old
+ new

@@ -38,10 +38,13 @@ class_attribute :unscoped_queries_on_index, default: false class_attribute :resolve_query_scope class_attribute :resolve_find_scope class_attribute :ordering class_attribute :hide_from_global_search, default: false + class_attribute :after_create_path, default: :show + class_attribute :after_update_path, default: :show + class_attribute :invalid_fields class << self delegate :t, to: ::I18n def grid(&block) @@ -425,12 +428,16 @@ end # This is used as the model class ID # We use this instead of the route_key to maintain compatibility with uncountable models # With uncountable models route key appends an _index suffix (Fish->fish_index) - # Example: User->users, MediaItem->medie_items, Fish->fish + # Example: User->users, MediaItem->media_items, Fish->fish def model_key model_class.model_name.plural + end + + def model_name + model_class.model_name end def singular_model_key model_class.model_name.singular end