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 7413165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:39:15+00:00 2026-05-29T06:39:15+00:00

Using Rails 3.2.0 with haml, sass and coffeescript: Basically I am trying to disable

  • 0

Using Rails 3.2.0 with haml, sass and coffeescript:
Basically I am trying to disable jQuery_Mobile loading pages with ajax without having to include a buch of javascript within any of my views.

I tried this:

13 //= require jquery¬
14 //= require jquery_ujs¬
15 //= require_tree .¬
16 $(document).bind("mobileinit", function() {¬
17   $.mobile.ajaxEnabled = false;¬
18 });¬
19 //= require jquery_mobile¬

with no success, I don’t completely understand the chain of events when = javascript_include_tag "application"¬ is called and what // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD GO AFTER THE REQUIRES BELOW.¬ means?

  • 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-05-29T06:39:15+00:00Added an answer on May 29, 2026 at 6:39 am

    Anything you put in the application.js manifest file will be executed at the bottom of that file once all other require directives have been run.

    What you want is to put this code inside a javascript file (call it jquery_mobile_startup.js) and put a require 'jquery_mobile_startup.js' at the top of your file.

    Sprockets honors the order you put stuff in there and require_tree will not re-import what you already imported.

    To expand a bit on this:

    application.js is being read as the manifest file for what files to include and when running in production Sprockets/Rails will combine all files that are required in the manifest into one big minified JavaScript file and serve that to your users.
    Only in development will the <%= javascript_include_tag 'application' %> generate multiple tags for you.

    All require calls will generate a tag and all regular Javascript code will be remain in application.js that gets imported after all imported files (in development).

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

Sidebar

Related Questions

If you are using HAML and SASS in your Rails application, then any templates
If using HAML on Ruby on Rails, then :sass #someDiv border: 3px dashed orange
I've got some experience using haml (+sass) on rails projects. I recently started using
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Having used Haml and Sass for a few Rails side projects, I've found that
I am using haml with my rails application and i have a question how
I'm using Haml (Haml/Sass 3.0.9 - Classy Cassidy) stand-alone to generate static HTML. I
I am using Rails 2.3.5, but when I use (in HAML) - s =
I'm trying to render a calendar with Rails and Haml . The dates used
I'm using Rails 2.3.2, and trying to get a nested object form to work

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.