Tagged Questions
0
votes
2answers
18 views
Reference a Coffeescript event in a separate JS file
Basically I already have a piece of coffeescript that animates a drop down menu:
menu_in = -> $('.cart_pulldown').slideDown(250)
menu_out = -> $('.cart_pulldown').slideU(150)
...
1
vote
1answer
14 views
skip_before_filter :authenticate_user! does not work for AJAX call
I have a controller:
class SessionTimeoutController < ApplicationController
# snip
skip_before_filter :authenticate_user!, only: [:has_user_timed_out]
#snip
# Determines whether the ...
0
votes
0answers
22 views
Rails: Loading animation while rendering partial
I know similar questions have been asked here before, but my situation's a little different so I don't think this is a duplicate.
I'm following along with Bate's tutorial on infinite scroll. I have a ...
1
vote
1answer
36 views
Rails insert dynamic fields into the database
I have a simple app with a single model (task) and a single attribute (name).
app/views/tasks/_form.html.erb
<%= form_tag :action => 'create' %>
<div id="dynamicInput">
Task ...
0
votes
2answers
19 views
How to not merge all js into one file in Rails 3.2?
I use Rails 3.2. I am using a lot of JS gems, and most of them require to be called in specific order. In development it automatically seperates different JS files like this :
<link ...
1
vote
0answers
42 views
Rendering HAML using javascript in partial in ERB, Ruby on Rails
I have started working on a project and the person before me used HAML to display two select boxes and update the second based on the selection of the first. I do not understand how to convert the ...
0
votes
0answers
9 views
How to record requests during testing Javascript crawler (Capybara + Poltergeist) in Ruby?
I am using Capybara + Poltergeist as replacement for Mechanize.
Mechanize doesn't support Javascript and I want to scrap page which heavily uses JS and iframes.
I am using similiar approach to this:
...
0
votes
3answers
37 views
Javascript notification when a file is uploaded
The following form works well to upload a file and stays on the same page. So far so good, the file does make it to the server.
= form_tag("imgupload", remote: true, multipart: true, id: ...
0
votes
1answer
14 views
Rails javascripts not updating, even when changed, comitted, and pushed
I'm having a very frustrating problem, where the changes I'm making to my javascripts aren't appearing in production, but are in development Everything works on the localhost, but not on my heroku ...
0
votes
1answer
16 views
Ruby on Rails Test Email Uniqueness Inside Javascript
I am having trouble finding an efficient asynchronous method to test whether an email that a user enters is unique. I don't want to use validates within my controller because I want to present a popup ...
0
votes
1answer
21 views
How to stop $.getScript() error message?
I simply call $.getSCript(location.href) and it gets the script properly, however if the file is not there (and that is what I am planning to do a lot) it prints an error GET (url) 500 (Internal ...
0
votes
0answers
16 views
How do I route to static (non-application content) using Rails
Alright, this is a weird one...
Inside my rails application there is a backbone application. This backbone applications contains modules (distributed by requirejs) which need to be unit tested.
I ...
0
votes
2answers
20 views
How to Display various JS alerts in a row using Ruby on Rails?
I want to display various JS alerts all in a row. Below is an example of what I want:
def exec
render :js => "alert('Exec function has started');" and return
if was_executed_successful?
...
0
votes
1answer
27 views
Reload controller variables in view
In a rails application i am working on, i would like to refresh/reload the index method of my controller without refreshing the view. For instance lets say i have this as my index:
def index
...
0
votes
0answers
19 views
Dynamically add fields in rails with out nested attributes
I am in the early stages of creating an app, and am just putting some basic code in place. Here is the current code...
app/views/cards/front.html.erb
<%= form_for(front_of_card_path) do |f| %>
...