Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7965423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:09:04+00:00 2026-06-04T06:09:04+00:00

Im wondering on how to approach this. For simplicity lets say I submit a

  • 0

Im wondering on how to approach this.
For simplicity lets say I submit a link from a website through javascript to my rails server.
I want my rails server to create a page based off that link and pull out the logo from that page. Right now I have the code to find a logo off a webpage but not sure how I can link the two together.

My controller takes in the json post request and saves a page object but how would I know ask it to run my js and save that image location in the page object as well?

Any help would be great thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:09:06+00:00Added an answer on June 4, 2026 at 6:09 am

    If I understand the question: you want to add a page after the server took the logo by following the link? And the page will be created with this logo.
    If so, then the server itself should follow the link by using for example mechanize, and there find the link to the logo. For example:

    require 'mechanize'
    ...
    def create
      @page = Page.new(params[:page])
      link = @page.link
      agent = Mechanize.new
      page = agent.get link
      img_src = page.search("#logo").first.attributes['src']
      @page.logo = img_src
      if @page.save
      ...
    end
    

    More complex example: http://caldeas.com/2010/08/01/using-mechanize-to-download-images-from-stock-exchange/

    This is probably not what you wanted, but it will solve your problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wondering the best way to approach this. I have a JavaScript file in
Am wondering if there would be any security flaw in this approach. I am
I am wondering what would be the best approach to store, for let's say
I'm wondering if there is a better way to approach this problem. The objective
I was just wondering if this approach looks like a good practice for apps
wondering about the best way to approach this particular problem and if any libraries
I was wondering if this approach was correct : public ITask getState() { statePredicate[Some
I was wondering what the best way to approach this problem in ASP.NET MVC
I am wondering how you would approach this problem I have two Taxrates that
I'm wondering what the best way to approach this problem is... I have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.