Class: Structure

Inherits:
ApplicationRecord
  • Object
show all
Includes:
AbAdmin::Concerns::AdminAddition, AbAdmin::Models::Structure
Defined in:
lib/generators/ab_admin/install/templates/models/structure.rb

Instance Method Summary collapse

Methods included from AbAdmin::Concerns::AdminAddition

#admin_comments_count_non_zero, #for_input_token, #han, #new_changes, #next_prev_by_url, #token_data, #translated_any

Methods included from AbAdmin::Models::Structure

#admin_title, #redirect?

Instance Method Details

#should_generate_new_slug?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'lib/generators/ab_admin/install/templates/models/structure.rb', line 15

def should_generate_new_slug?
  slug.blank? && new_record?
end