0
votes
0answers
9 views

Resize video player and give it different video urls

I have many video thumbnails and I'm trying to display the original video-player above the thumbnails when someone clicks on the thumbnail. I'm using jwplayer and I want to display the original video ...
1
vote
1answer
24 views

Ajax response and json

I am trying to make an ajax call to the controller which inturn calls a method from the model and returns to me an array of values. But I am unable to get any response in ajax. I need to set value of ...
0
votes
0answers
7 views

How to use Styles with Gmaps4Rails2

I'm trying to use styled maps as documented here: https://developers.google.com/maps/documentation/javascript/styling?csw=1#styling_the_default_map So look at the documentation here ...
0
votes
1answer
17 views

JQuery events are not working on heroku in production but work in development

this seems to be a common problem but I haven't found a solution applicable for my case. I have some JQuery in bikes.js.coffee that works correctly in development locally. When I push to Heroku the ...
0
votes
0answers
22 views

Completely Stuck on AJAX Form Submission With Stripe

I am so frustrated. I'm working with Stripe to create a form submission system for payments. Basically, the form makes an AJAX call to Stripe, which gives me a token on success, which I then use to ...
0
votes
1answer
15 views

Rails 3.2 Coffeescript to Refresh Div using Ajax - Reloading entire page

So I need some help identifying why I am getting a fullpage refresh when I only want to refresh a div. #Div refresh, error on loading entire page and not just div - Need fix $.ajax success: ...
0
votes
1answer
18 views

Rails - menu for users

In my Rails app I render a list of all users. @vk.friends do |friend| = friend.username = friend.sex = friend.birth_date How can I make a menu of links which show male and female users ...
0
votes
1answer
9 views

Jquery Event Handlers not firing in Rails App

I have a Rails 4 app and am having some trouble with jquery event handlers/turbo_links and touch vs click actions. What I mean by this is, I am binding all of my handlers like: //special bindings ...
1
vote
1answer
16 views

ajax loading image in rails

I am trying to implement an ajax loading image in my rails app. Right now what I have is a loading gif that is there on page load, during the ajax process, and then disappears once the ajax is ...
0
votes
0answers
5 views

CKEditor usage after AJAX load in Rails

On the Tools show page, I'm endeavoring to do an AJAX load of the corresponding edit page (and accompanying form partial) and use CKEditor to edit the fields. Though CKEditor is working when I go the ...
0
votes
0answers
20 views

Resizing image at client-side using JQuery file upload to amazon S3

I already saw some examples at the internet like: this and this one, but I'm following the RailsCast Episode #383 Uploading to Amazon S3 and at the very end of the video he mentions about resize the ...
0
votes
1answer
12 views

how to save object to session with jquery plugin

i'm using this plugin to handle my session, but everytime i save object $.session.set("test",{a: "1",b: "2"}) it automatically convert to string "[object,object]", so the object is gone. how is ...
0
votes
1answer
28 views

Fancybox - Image is overflowing off right side of lightbox

Looks like this question has been asked before, here, but the asker solved his own question by switching to prettyPhoto. I'd prefer to figure out why this is happening, just to understand, but I will ...
0
votes
0answers
12 views

page using best_in_place loads as string after refresh

all, I'm using best_in_place on one HAML view page in my app, called in one line: -object.each do |obj| %tr -important_attributes(obj).each do |key, value| %td ...
0
votes
0answers
51 views

Best in Place and jQuery: how to reload dom elements after successful ajax call

I have a Rails 4 to-do list app where when I check the task checkbox, the form is automatically sent and the task is then added to the proper list (complete or incomplete tasks). This code looks like ...
1
vote
0answers
16 views

Rails 4 - ajax:success isn't being triggered

I submit a form via ajax. I can see in the network panel of Chrome that it was succesfful and returned some JSON. However, the "ajax:success" event is never being fired. Why? // Does not work, ...
0
votes
1answer
19 views

Elegant way with Jquery to track document clicks persisted

I'm trying to persist some data which is how many times a user does the mousedown on the entire document. The problem is dealing with redirects and freshing pages which with my means lose all ...
0
votes
2answers
18 views

jquery and controller issue with endless page scrolling

I recently implemented endless page scrolling as seen in the blog post. In summary, I show 10 posts on a page, when the user reaches the bottom of the page, the app fires a 'get' request to the index ...
0
votes
1answer
12 views

Rails 4 AJAX login form

I try make a AJAX login form using parameter remote in login form. But after login i can't redirect user to home page. But redirection does not work. My code below: class SessionsController < ...
-2
votes
3answers
33 views

Dropdown list is not remain selected after refreshing the window

I have a drop-down list like bellow: <select class="span2" id ="sort" name= "order_by"> <option >Default</option> <option >Price</option> ...
0
votes
2answers
28 views

Form submitting using jquery without ajax in rails

I am new to rails.i Want to sort content using jquery by selecting value from dropdown list. so i am having problem to submit a form to a specific controller action using jquery. I have a category ...
0
votes
1answer
28 views

:remote => true creating unknown format?

Check this out. I've got a fairly simple form that's created with the following syntax: <%= form_for([@issue, @issue_order], :remote => true) do |f| %> The form, due to logic on the page, ...
0
votes
1answer
17 views

how to create buttons to change page content in Ruby on Rails app

I am building a Ruby on Rails web application and I use bootstrapUI for the view of my application. I want to create 4 buttons in my index page and when I click in each one of them then the content ...
0
votes
0answers
18 views

FlatUI - radio buttons jQuery compatibility

My current project's configuration is: Ruby on Rails 4.0.1, with turbo links jQuery 1.10.2 (from google's CDN) FlatUI Pro version 1.2.2, which includes "flatui-radio.js" v0.0.3 I am trying to ...
0
votes
2answers
27 views

Can't get if else to work right in HAML javascript

Doing a little demo mini-blog app with comments. Working with ROR and HAML. I want the comments to be created with AJAX so I wrote create.js.haml. I also want errors to appear if there were any during ...
0
votes
0answers
20 views

Bootstrap X-editable a number(10,2)

I have a Rails/PG app with a column (data field) defined as numeric(10,2) Can I in-place edit it with Bootstrap X-editable? I tried number like this: <a href="#" class="xeditable" ...
0
votes
0answers
25 views

Auto-save duplicating forms with Nested Forms on Rails

I have a problem with an auto-save method I created. I have a project where I use many nested forms, it's a big form. I separated this form in different parts using tabs (Jquery-ui tabs). One of the ...
-1
votes
1answer
19 views

unterminated regular expression literal js error

I have added jQuery validator add method for the presence of http check in url field. JS jQuery.validator.addMethod("valid_url", function(value, element) { if(!/^(https?|ftp):\/\/i.test(val)) ...
0
votes
0answers
12 views

Cloudinary jquery upload is not saving image_id correctly

I'm using Cloudinary with jquery to directly upload an image from the browser in a RoR app. I think I've followed the instructions from here pretty much exactly. The image upload is working, but ...
0
votes
1answer
42 views

jQuery not loading in Rails 3.2.6 application

I am using Rails 3.2.6 and the application.js file under app/assets/javascripts is being linked in my <head> by <%= javascript_include_tag 'application' %>. In application.js after //= ...
0
votes
1answer
26 views

Replacing a partial with a form partial when clicking edit with ajax

In my rails app, I want to be able to click "edit" to replaced/swapped a show partial with a form partial. I have gotten started applying ajax and jquery by adding remote:true to my edit link. I ...
0
votes
1answer
15 views

Autocomplete with typeahead in rails 3

I'm developing autocomplete for a particular form in my rails app; for this purpose I'm using typeahead.js with custom controller method. So far, it works but I need using those values within the form ...
0
votes
1answer
112 views
+50

Button click does not fire on second click

I have a lot of buttons with the class search_camera_btn. When clicking on the button then it submits a form. This step works. On the other side, it should also trigger a button click event. I ...
0
votes
1answer
25 views

Does “this” object work in js.erb on Rails 3

There are many row in my table, and each row contains an button. When the button clicked, It will send remote js to my method in the controller. And it supposed to remove the row which the button ...
0
votes
1answer
23 views

Error using erb in js.coffee files in the rails asset pipeline

I have the following code: /assets/javascripts/home.js.coffee.erb jQuery -> addClickListeners = -> $(document).on 'click', '#add-chord-link', addChord $(document).on 'click', ...
0
votes
1answer
37 views

List elements in sortable only respond to addClass after sorting

I setup a Sortable nested form in a Rails 4 application by modifying a bit the Railscast 147 tutorial and it all works fine. In my project, each li wraps a fields_for with the fields for a nested ...
0
votes
1answer
23 views

Trigger form submit with multiple submit buttons

I have a form with two submit buttons, Rails backend expects to receive one of the button names (action1 or action2) in the params hash. I want to show "are you sure?" message on one of the buttons. I ...
2
votes
2answers
28 views

determine if user selects 'cancel' in dialog box

In my rails app, I create a confirm dialog when a user tries to delete an image: <%= link_to image, :method => :delete, :confirm=> "Are you sure you want to delete this video?", :remote ...
1
vote
1answer
23 views

rails javascript - two select boxes with same category but selection of one value does not show in another

i got a form having two select box populated from the same category model. <%= collection_select(:c, :id1, @categories, :id, :name) %> <%= collection_select(:c, :id2, @categories, :id, ...
0
votes
1answer
17 views

Re applying jquery for new fields in nested forms - Rails 3

I'm new to jquery, and i'm using nested forms on rails. The form is so big that I'm trying to apply an accordion plugin to the form. Here is what happens: The accordion plugin works well as the form ...
0
votes
2answers
36 views

Dynamic id name based on model in jquery

I'm following railscasts for jcrop but was wondering how do I have a dynamic model name in jquery if I have something like this: update: (coords) => $('#user_crop_x').val(coords.x) ...
0
votes
1answer
22 views

How can i access jquery functions defined in assets javascript foler to my js.erb extention under specific controller?

I am having a custom.js file in app/assets folder which was created when I generated a custom controller. Now i have created a custom_action.js.erb file under app/views/customs which is a part of ...
0
votes
1answer
34 views

Is it possible to initialize a variable with an AJAX call in Coffeescript

I have an ajax call that fetches some JSON by hitting my controller: class @Team constructor: () -> @players = null @getTeamInfo() getTeamInfo:(teamId) -> request = $.ajax ...
0
votes
1answer
25 views

Rails and knockout.js bind nested element without using foreach in fields_for

I'm using rails 3.2 with knockout.js and ko.mapping. I'm able to map from my json data and create my viewModel from that, in js console I can view the tree of data fine. In my view I'm using ...
0
votes
3answers
31 views

Ajax submit in input field

I know this may be a common question but I've been searching for a couple hours with no luck, so I figured I'd ask. How do make a form submit through ajax on an input field change? I have a form ...
0
votes
0answers
19 views

Ruby on rails and JQuery-datatables with TableTools. Saving all pages of the table

I am using JQuery-datatables for my model Contacts and apply for this TableTools. I have provided several buttons for datatable, but it saves only one page instead of saving all my table. In Examples ...
4
votes
1answer
71 views
+100

How to use jquery-fileupload for nested attachments?

I am using jquery-fileupload-rails for multiple files uploading. I want to achieve ability to set name of document and adding to it multiple attachments. But right now when I choose 3 attachments it ...
0
votes
1answer
44 views

Ajax request is not working in ruby on rails

i created a quiz and question displayed one by one and have to display the questions in list where it click it goes to the id of the question in list. but it does not work it the loader does not stops ...
-1
votes
2answers
87 views
+50

Google Instant style in Rails

I want to do a search in my site that users can view the results while typing (in real time), like the Google Instant. I'm using Rails, so anyone knows a gem and/or a jquery plugin to do this? PS: I ...
5
votes
3answers
204 views
+50

How to add random button to form

I want to provide users a 'random' option so they can select a previous created date idea to use from the database (inside the letsgos table). There’s a “Let’s Go...” section that users can fill out a ...

15 30 50 per page