Class | Link
In: | app/models/link.rb
Parent: | Document

### Methods

disable_unnecessary_fields

### Included Modules

DraftUtils::InstanceMethods

### Public Instance methods

disable_unnecessary_fields()

Los links comparten tabla con Page, News y Event y algunas de las columnas no son necesarias para los links. Aquí se vacían. Se llama desde before_save

[Source]

        # File app/models/link.rb, line 9
     9:   def disable_unnecessary_fields
    10:     self.has_comments = false
    11:     self.comments_closed = true
    12:     self.has_comments_with_photos = false
    13:     self.has_ratings = false
    14:     self.comments_count = 0
    15:     self.starts_at = nil
    16:     self.ends_at = nil
    17:     self.place = nil
    18:     self.speaker_es = nil
    19:     self.speaker_eu = nil
    20:     self.speaker_en = nil
    21:     self.lat = nil
    22:     self.lng = nil
    23:     self.location_for_gmaps = nil
    24:
    25:     self.show_in_agencia = nil
    26:     self.cover_photo_file_name = nil
    27:     self.cover_photo_content_type = nil
    28:     self.cover_photo_file_size = nil
    29:     self.cover_photo_updated_at = nil
    30:
    31:     self.show_in_irekia = true
    32:     self.stream_flow_id = false
    33:     self.journalist_alert_version = 0
    34:     self.staff_alert_version = 0
    35:   end

[Validate]