Question

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'

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top