Nathan Tornquist
Nathan Tornquist

Reputation: 6609

How do I have a ruby program call into a rails app?

I want to write a cinch IRC bot that sends information to a rails application. The rails application will essentially function as a monitor for users, and theoretically the data displayed will continually refresh.

I have the basic IRC bot working on it's own and have written standalone rails applications before. I do not know what the best way to integrate them together is though? Using sidekiq could start the bot, but it does not give me a clean way to connect back into the website.

Upvotes: 0

Views: 146

Answers (1)

spickermann
spickermann

Reputation: 106792

I see three options:

  1. Build an api and let your script send requests to that api endpoint
  2. Use script/runner to call your methods in your app directly
  3. Let the script store data directly into the apps database

I think the api solution is the only reasonable option for security and maintainablity reasons.

Upvotes: 1

Related Questions