I am trying to create a Facebook iFrame app. The app should first show an image and if the user likes the page, he will get access to some content.  I use RoR, therefore I can't use the Facebook PhP SDK.  Here is my iFrame HTML when the user ha...
Turbolinks prevents normal $(document).ready() events from firing on all page visits besides the initial load, as discussed here and here. None of the solutions in the linked answers work with Rails 5, though. How can I run code on each page visit...
As per 'unobtrusive JavaScript' recommendations I want to separate my JavaScript logic into separate files. However I don't know how to organize them.   Should I:   Just throw all application javascript into Application.js file and load...
Is there any way to use a Rails helper method, more specifically, a path helper method within a javascript asset file. This file foo.js.coffee.erb  $('#bar').val("<%= create_post_path %>")   I would love it if I could get from...
I am trying to make ReactJS work with rails using this tutorial. I am getting this error:      Uncaught ReferenceError: React is not defined  But I can access the React object in browser console I also added public/dist/turbo-react.min.js as describe...
the Rails Guides says:     If there are missing precompiled files in production you will get an   Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError   exception indicating the name of the missing file(s).   I do execute:  bundle ex...
In my Ruby on Rails application I am using the Facebox plugin for an Ajax pop up window. I have 2 pages called add_retail_stores/new.html.erb and add_retail_stores/new.js. The new.js page inherits all elements from the new.html.erb page so it looks e...
I am having trouble deploying a rails 3.1 beta project to heroku. The problem happened at the database migration step. When I ran:  heroku rake db:migrate   I got error message:  > rake aborted!   > Could not find a JavaScript runtime. See >...
I have the following modal form from example:  <!-- Button to trigger modal --> <a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>  <!-- Modal --> <div id=...
I want to reload a partial every 3 seconds on a 'new'-view in my rails app.  I have this in my new.html.erb  <h1>Controller#new</h1> This is my static content <%= render partial: 'dynamic' %> More Static content   Ho...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.