Jump to content

The ultimate community for Ruby on Rails developers.


How to use Mechanize in rails correctly?

  • Please log in to reply
No replies to this topic

#1 azs



  • Members
  • 1 posts

Posted 13 January 2014 - 06:23 AM

Hi, I'm struggling on how to set this up and I'd really appreciate some help :) I think once I understand how to set everything up I can finish everything, and I'm really excited for this project!


The app is to manage multiple website accounts in one place. So there will be multiple website mechanize will fill out. The easiest way to explain it would be a local business can enter in a short message inside the app and this will be posted on their twitter account, facebook page, blog, etc by my app. I want multiple businesses to use the app, so I'm not sure if I need to do something specail for that.


I've got Mechanize to basically do what I want to do for one site which is visit website, login and fill out the correct form.


I just don't know how to use it inside my entire rails app. I want the business to enter their "message" in one place and it's stored in the database. I guess the Message Model.


This is the part I'm confused on. If they want to send the message to twitter and facebook. I guess they would select this on the Message view. When they hit "submit". I'm not sure how to use Mechanize. I've searched for a while now and can't find a good example. I think I need a controller for each website and create different methods using Mechanize in the controllers? Or I should have the methods in the Message Controller?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users