0
votes
1answer
32 views

Loading partial in a popup, what is the right way to go about it?

<%= link_to image_tag(p.image(:medium)), photo_path(p) %> In the code above, I want the link to go to the photo_path (which would be the show action on the photos controller). The show page ...
0
votes
0answers
13 views

jQuery slider and images in Rails

I have some images: 1.png, 2.png, 3.png. 4.png. 5.png, arrow_back.png and arrow_forward.png. They're in the assets/images folder. I'm making an image slider, where user can toggle back and forth with ...
0
votes
0answers
7 views

Clicking “back” in the browser disables my javascript code if I'm using Turbolinks in Rails

Well, as the title says more or less. I'm using the gem Turbolinks in my Rails application and I'm having a bit of a problem with the "browser back"-button. My javascripts works fine until i click ...
0
votes
2answers
36 views

Rails, AJAX form validation

I am new to jQuery, AJAX, and javascript in general, and I am trying to do some front end validation for a rails form that uses an ajax call to have the server run a query. It seems to work well, if I ...
0
votes
0answers
15 views

JQuery File Upload and Carrierwave to Detect Folders and Sub Folders

I have a fairly simple file upload system. Whenever multiple files are uploaded, it creates a new record in the database and stores the file name under the field file_leaf. Within the application, you ...
0
votes
2answers
43 views

Can you help me get a spinner to display in a Rails 3.2 - jQuery app?

I'm having trouble displaying a spinner in a Rails 3.2 app that uses jQuery. Entering site/assets/javascripts/application.js displays the code below so I know it is loading. Updated with feedback - ...
0
votes
2answers
41 views

How to get jquery animate to work in Rails 3.2.8?

I am using jQuery's animate() method in my Rails application. However, I can't get it to work. This is my application.js file: //= require jquery //= require jquery_ujs //= require_tree . I tried ...
0
votes
0answers
15 views

Can't get JQuery-FileUpload and Rails to work together

Should be a simple thing, right? Since the actual github site is a bit sparse on the instructions (besides a "look at the demo!"), I thought that I'd be able to figure it out. Here's what I did: 1) ...
-1
votes
1answer
37 views

A bit lost with Rails 3 and javascript

I'm working on my first rails application using Rails 3.2.8 ruby 1.9.3p392 It's very entertaining and I've been learning a lot. I remain though very much confused on how to use javascript in my ...
-2
votes
2answers
33 views

JQuery Ajax, Rails [closed]

I have no idea how to get about this. Say I want to animate a comment that has just been posted, maybe making it fade in, how would I set an ID to it in Rails so that I could select it and animate it? ...
1
vote
2answers
53 views

Can't find 'jquery-ui' Rails 3.2

I have been looking everywhere to figure out this problem. I already downgraded the jquery-rails gem to 2.3.0 in my gemfile. But when I include jquery-ui in application.js I still get the ...
1
vote
1answer
18 views

Rails + Javascript: How do I create a button that slides/changes a form from left to right?

For example, there's a form with 3 parts, A B and C. Initially the user can only see A. After filling out A and clicking a Next Button, the screen slides out A to the left and slides in B from the ...
0
votes
0answers
35 views

Pass javascript variable to render call in HAML :javascript tag

I am trying to create a news feed for my rails app. However I am running into an issue with updating the number of news stories being shown. The following code is from a partial in my views. I want ...
0
votes
1answer
47 views

Twitter Bootstrap Radio Button is always active

I am working on a rails app that has a main view with different panels that load various information. One panel uses bootstrap radio buttons to filter content results. When the page loads the ...
0
votes
1answer
37 views

Ruby on rails get mysql information depending on option value

I am wondering how I should go about retrieving information from a mysql database associated with my ruby on rails app. When a user selects a product from the select box, I want to use the value of ...
0
votes
1answer
29 views

Filtering a table created from a database

I have a table of announcements being created from a database. I am trying to filter this table into categories based on the 'type' column of the database. The database table has a column which ...
0
votes
1answer
15 views

jquery, jquery_ujs with jquery-ui-rails gem

Since jquery is packaged with Rails 3.0, I'm using the jquery-ui-rails gem to get jquery-ui. Looks like jquery_ujs is not packaged with Rails (or jquery-ui-rails). And I can't independently include ...
0
votes
2answers
27 views

Controller is looking for HTML format instead of JS format (though we set :remote => true)

I have the following link_to: <%= link_to 'user_' + user.id.to_s, {:controller => 'admin', :action => 'view_user', :id => user.id}, :remote => true %> However, when I click that ...
0
votes
0answers
8 views

Upgrading capybara prevents jq binding from working

I have li elements that have jQuery binding to the click event. I was using the below lines to test this feature and it worked until I just upgraded capybara to v2.1.0. Since the upgrade it seems the ...
0
votes
1answer
40 views

Where do I add the visibility toggle in my JavaScript?

I have seen other javascript toggle questions on SO But I am having trouble adding this into my method. I can't wrap my head around where I should drop it in to make it work. Here is the JavaScript ...
0
votes
0answers
29 views

.slideToggle() in rails app not working

I am trying to add some javascript to my rails app. I am trying to do something similar to the way twitter handles youtube links in a user's tweets (when a user clicks on the tweet/video the tweet ...
0
votes
1answer
35 views

twitter bootstrap with jquery input token SASS version not working correctly

I'm trying to use the twitter bootstrap sass version with jQuery input token in Ruby on Rails. I found the jQuery tokenInput bootstrap sass theme, and have added it as it says in the documentation. ...
-1
votes
1answer
37 views

How to call jquery function from another partial?

I've got a function draw() that is defined in the _draw_foo.html.erb partial. That file contains all the required vars to do the drawing. The function normally runs on window.onload. I have another ...
0
votes
1answer
39 views

Rails - js.erb file executes twice [closed]

Fairly new to Rails but not JS here. I am calling a controller action using AJAX from a form button, it all works no problem except that everything is happening twice! The js.erb file renders the view ...
0
votes
0answers
18 views

Rails jquery datetime into PG [closed]

I'm using jquery (coffeescript) to update a record. When that happens I would like today's datetime to go into this field: t.datetime "completed_at" This is the coffeescript: compdate = ...
3
votes
1answer
68 views

Rails Jquery on Checkbox

I begin in Rails and i created an application. In this application , the admin is the only person who can create user, when he signup the others users , he can check an checkbox for choose if he ...
0
votes
2answers
36 views

Find count of text areas with a particular attribute using Jquery

In my Rails app, In a form , I have several text areas. The attribute display:none is specified for some text areas. How to get count of text areas with the attribute display:none using JQuery. Anyone ...
0
votes
2answers
37 views

ui-dialog box closes but html code remains on page, results in box staying up when using the box more than once

I've got a page with a popup box used to replace tds with new tds. The box works fine the first time, but each subsequent time, the box continues to display after hitting submit. I noticed that the ...
0
votes
1answer
32 views

Page Reload WithOut Refresh in Ruby On Rails on DatePicker Select Event?

My Scenario as Follows When i change date the corresponding appointment list will change. My Controller as Follows def index if (params[:appdate]!=nil) @t=params[:appdate] else ...
1
vote
1answer
32 views

Rails & jQuery - How to get script to remove HTML element to work multiple times

I have a form that displays client-side validations as the user enters information and a jQuery script that gets rid of the error messages after a period of time. However, the script only works once ...
0
votes
1answer
28 views

gmap4rails not displaying map unless jquery not called

I have a really weird problem using gmap4rails. I followed the setup on github exactly and I just get a blank box. I can see that there are calls being made to the map provider (in this case, Bing), ...
1
vote
1answer
29 views

Browser previous button and modal window

I need the following functionality when I open any modal window or look at photos (fancybox), previous button in browser should show me the page from which I opened the modal window or photo.
1
vote
1answer
24 views

Cucumber test not working

I am new to testing and I am having tough time to figure out the why my test is not working. Here is my feature file called child_user_selected_categories.feature @no-database-cleaner Feature: ...
0
votes
1answer
33 views

jQuery datepicker - How to populate due date from chosen date

I am a rails newbie trying to use Datepicker to set up reservations in a rental app. I have it working for the start at date and would like to set a due at for 2 days later. I've gotten stuck and am ...
0
votes
2answers
40 views

Undefined ruby object in javascript

I'm trying to do something ONLY if a variable DOES exist (the variable's name is @filter), the problem is I can't seem to figure out how to get the code to work. I keep getting undefined method ...
0
votes
1answer
26 views

Javascript object.style.color not working in create.js.erb

Please view the create.js.erb code below which fades in a new vote when its created. I would like to have the color of the total number of votes change when the value is below 0. The code below works ...
0
votes
3answers
48 views

AJAX request only functioning properly when all the code is on one line

I have an AJAX request that gets sent from a controller like so: in controller: respond_to do |format| format.js {render 'show_data'} end show_data.js.erb $('#foo').html("<%= render ...
0
votes
0answers
17 views

FullCalendar & Rails: When updating event via AJAX, is authenticity_token required?

I'm about to implement the eventDrop and eventResize methods for my calendar and am wondering how far into the rabbit hole I need to go to interact with Rails. I've got Rails 3 on the server-side and ...
0
votes
5answers
57 views

How to find the total number textarea in a form using Jquery

I want to know how many text areas I am using in a form using JQuery as the text areas can be added and deleted. Minimum of two will be there. I know how to find total number of text boxes. Please ...
0
votes
1answer
53 views

heroku deployment error ruby on rails

I'm using ruby on rails 3.2 and added a jquery based calendar, i worked until I added this calendar. I don't understand whats the problem. The error is the typical: We're sorry, but something went ...
0
votes
0answers
27 views

Tablesorter filter gets error when calling length method on table.config.cache.row

I am working with RoR application and trying to implement fulltext search for jquery-tablesorter Example here: http://jsfiddle.net/BCreb/104/ Everything work great in jsfiddle, but when i set it to ...
0
votes
0answers
42 views

Ruby on Rails (3.2+) - Updating a <p> tag after a textarea's OnChange Event

I'm a beginner in Ruby on Rails and am currently going through the tutorial at railstutorial.org. I'm currently trying to use jQuery in conjunction with Ruby on Rails but seem to be having trouble. ...
0
votes
1answer
47 views

Form not submitting after ajax partial render

I'm working on a site, that allows you to make wishes. I want the user to be able to create a wish from anywhere on the site, which is why I thought of going with an jquery/ajax approach. I have a ...
1
vote
3answers
70 views

Change Label to Textbox on edit hyperlink click

i am new to ruby on rails and twitter bootstrap. Accept my apologize if my question sound dumb. I am using twitter bootstrap for my site design. I have been trying to use bootstrap to change my label ...
0
votes
0answers
44 views

Rails notice using unobtrusive javascript

I need write some unobtrusive javascript code to show the jquery gritter message. I need to show it when I create a <p id="notice"></p> element in my page This is the code to create te ...
0
votes
2answers
55 views

How to get 'id' from an open bootstrap modal?

I have a modal with id="<%= p.id %>" (the id of the post that is in the modal). I want to do something with the content of the modal when it is open (and I need to do this in the.js file). But ...
0
votes
0answers
29 views

jquery datepicker broken on heroku

I have the datepicker installed, was working perfectly until a few days ago. It works fine locally, but after I precompile assets for heroku, the style is all broken. Here is an example: ...
-1
votes
1answer
35 views

Store jquery return value to rails database [closed]

I have a jquery written. Which return a value with $('#serialStar2').val() . Now I am wondering what is a neat way to store the returned value inside the database using hidden_field ?
0
votes
1answer
25 views

Pass value from jquery to rails form's hidden_field

I have jquery which renders a value inside an html element <div id="serialsNewFormatted"></div> Which is nothing but a number/integer. Now I want to pass value rendere inside the above ...
-1
votes
0answers
19 views

Getting no method undefined toLowerCase [closed]

I'm using the textext-rails gem. When I enable autocomplete function on this gem the browser console would give me "undefined method toLowerCase". I have tried to use jQuery.noConflict(); and it is ...

1 2 3 4 5 72
15 30 50 per page