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

  • Home
  • SEARCH
  • 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 8977723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:26:15+00:00 2026-06-15T19:26:15+00:00

I have a website that allows users to post links. I am trying to

  • 0

I have a website that allows users to post links. I am trying to get the soundcloud links to embed the mediafile thus I am attempting to use AutoHtml Gem. I did gem install Autohtml, put it in my gemfile and in config/application.rb and ran bundle install. Why isn’t Auto_html() working.

GEMFILE

source 'https://rubygems.org'

gem 'rails', '3.2.8'
gem 'bootstrap-sass', '2.0.4'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'jquery-rails', '2.0.2'
gem 'pg', '0.12.2'
gem 'rails_autolink', '~> 1.0.9'
gem 'rinku', '~> 1.5.0', :require => 'rails_rinku'
gem 'auto_html', '1.6.0'


CONFIG/APPLICATION.RB

require File.expand_path('../boot', __FILE__)

require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
require "rails_autolink"
require "rails_rinku"
require "auto_html"


VIEW/MICROPOSTS/_MICROPOST.HTML.ERB

<% if micropost.url.include? 'soundcloud' %>
  <%= auto_html(micropost.url)  %>
<% end %>

Sorry for the ignorance I’m new to Ror I appreciate the help. I only want to Auto_html here for soundcloud in particular. What am I forgetting to do?

  • 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-15T19:26:17+00:00Added an answer on June 15, 2026 at 7:26 pm

    It is helper method, so you’ll need the following lines:

    # app/helpers/application_helper.rb
    
    module ApplicationHelper
      include AutoHtml
    end
    
    # app/controllers/application_controller.rb
    
    class ApplicationController < ActionController::Base # or something like that
      helper ApplicationHelper
    end
    

    Edit if you read the page, there’s an example block given: https://github.com/dejan/auto_html

    auto_html(str) { simple_format; link(:target => 'blank')

    For soundcloud use

    auto_html(str) { soundcloud }

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

Sidebar

Related Questions

I have a CMS website written in aspx 2.0 that allows users to build
I have an entries controller that allows users to add contact information the website.
I have a niche website that needs to allow users to post events and
I'm programming a website that allows users to post classified ads with detailed fields
We have a website that allows customers to post pictures and videos directly to
I have been given the task to create a shop website that allows users
I run a website that allows users to write blog-post, I would really like
I have a mobile website that allows users to upload photos using the file
In my website, I have a form which allows users to post an image
I have a HTML form that allows users to register for my website, I

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.