Twilio gem is using the same name as model twilio . That is why rails generator not letting you to create twilio model. So it is better to use some other name
Creating a Twilio Model
-
29-07-2023 - |
문제
I am trying to create a twilio model so that I can have attributes such as "type" (welcome, confirmation) and body ("Thank you for signing up!", "You have confirmed").
I believe that creating a model is appropriate because I am using rails Active Admin and I would like to give the admin the ability to change the twilio body for the appropriate message type whenever needed (without having to return to the code).
When I try creating a twilio model:
rails g model twilio type:string body:string
I get the following error message:
The name 'Twilio' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.
How do I access or add to the existing Twilio model to my app files?
I am guessing that this file exists because of the gem 'twilio-ruby'
해결책
제휴하지 않습니다 StackOverflow