# Tipo di attributo non dichiarato per enum 'chat\_send\_shortcut' in UserOption

**URL:** <https://meta.discourse.org/t/undeclared-attribute-type-for-enum-chat-send-shortcut-in-useroption/352308>\
**Category:** Development\
**Created:** [14 Febbraio 2025, 3:42pm UTC](https://meta.discourse.org/t/undeclared-attribute-type-for-enum-chat-send-shortcut-in-useroption/352308 "2025-02-14T15:42:10Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [14 Febbraio 2025, 3:42pm UTC](https://meta.discourse.org/t/undeclared-attribute-type-for-enum-chat-send-shortcut-in-useroption/352308/1 "2025-02-14T15:42:10Z")

</div>

Stavo cercando di eseguire rspec sui plugin e ho ottenuto questo:

 ![L'immagine mostra un messaggio di errore da un'applicazione Ruby on Rails durante il caricamento delle gemme, relativo ad attributi non definiti su 'rake plugin' e esempi mancanti nel file 'rails_helper.rb'. (Sottotitolato dall'IA)](https://global.discourse-cdn.com/meta/original/4X/6/8/a/68afb3281f418ffa57dddcd8033db727ee9b5fd9.png)

Sembra essere stato introdotto qui:

> <https://github.com/discourse/discourse/commit/2cff8c82e36e584346040200a2bcc3192bb3b9ad#diff-9b2a0802874dc8d1bbba919910474ed1b5f0bc2e47b71e69f7aae1d43181eb60>
>
> Users can now decide if they want to send a message on:
> \- \<kbd\>enter\</kbd\>
> \- \<…kbd\>meta + enter\</kbd\>
> 
> If you choose \<kbd\>meta + enter\</kbd\>, \<kbd\>enter\</kbd\> will add a
> linebreak.
> 
> \<img width="192" alt="Screenshot 2025-01-21 at 12 57 48"
> src="https://github.com/user-attachments/assets/abfd6f8b-83b3-4e6f-be67-8f63d536ca8a"
> /\>

> <https://github.com/discourse/discourse/blob/main/plugins/chat/lib/chat/user_option_extension.rb#L53-L55>

Potrebbe mancare `base.attribute :chat_send_shortcut, :integer, default: 0`?

---

_[View the full topic](https://meta.discourse.org/t/undeclared-attribute-type-for-enum-chat-send-shortcut-in-useroption/352308)._
