Tag: jquery

Do I have to install Gem for jquery to use it Rails?

I have really silly question… I’m starting my adventure with RoR and I have some problems with using jquery. When I’m trying to add some jQuery “magic” to my project it simply doesn’t work. I haven’t installed any Gems for jQuery because in application.js there is already line: //=require jquery If Gem is needed which […]

How to render several templates from a sub directory in ruby on rails

I have some templates stored in my pages view directory: Pages/settings/edit_account/ basic_info.html.erb relatives.html.erb contact.html.erb I have a piece of javascript using the jquery .load function. I’m basically allowing users to click the links on a page: basic info, relatives, contact and have the information they need to see in order to make the edits show […]

Trouble with rails3-jquery-autocomplete

I’m attempting to link two models together with has_many and belongs_to along with using rails3-jquery-autocomplete, but I cannot seem to get it to pull any data from the vocab table. I am trying to autocomplete the ‘skills’ field with data from ‘vocab’ table. I can submit skills just fine and they save properly in the […]

client_side_validation and date_picker – not working (Rails)

I am getting ‘can’t be blank’ error even when I have a value. Validation works fine if I manually enter the data in the field. If I were to populate the date with date picker, it disable the submit button and I am not able to submit the form. I am using JQuery date picker, […]

Rails – best_in_place jQuery conflict

Okay, I’m really pulling my hair out here! I’m using the gem best_in_place. But I always have a conflict with jQuery and I don’t know what the problem is. Uncaught TypeError: Property ‘$’ of object [object DOMWindow] is not a function I can confirm that jQuery is first loaded and best_in_place.js second. || SOLUTION || […]

Is there a rubygem to prevent a page from reloading on a controller call? If not where do I put javascript/jquery?

I have a table where each row has a select_tag and a submit_tag. I’d like to call this without reloading the page. I have the full functionality in place but the page has to reload. If there’s no gem, let’s say I try something like this: prevent page reload and call a jquery function when […]

What is the difference between jQuery rails(2.2.1) and browser's jQuery(1.8.3)?

i am new to ruby on rails, i installed latest gem jQuery rails(2.2.1) but the browser jQuery version is 1.8.3 why it’s different

How can I line up images using ActiveRecord

I am using Rails to achieve the following effect for a beauty item sales site Assuming I have the information stored on the DB how can I generate or display the items as shown in the picture while giving the user the option to click “Next” and continue viewing the other items. Is there a […]

Ruby on Rails autocomplete gem undefined local variable

I’m trying to use rails3-jquery–autocomplete gem by CrowdInteractive: https://github.com/crowdint/rails3-jquery-autocomplete/blob/master/README.md I get this error however: undefined local variable or method autocomplete_food_long_desc_foods_path’ for #<#<Class:0xa17cf00>:0xa5ac724> I know this question has been asked before, but I still can’t seem to figure out what I’m doing wrong. I followed all the instructions in the README, and here is my code: […]

Gems dependency error

I am following Michael Hartl’s Tutorial on RoR. During the 3rd Chapter (sample_app), I am trying to install the gems via the “bundle install –without production command” but I keep encountering the following issue: Bundler could not find compatible versions for gem “railties”: In Gemfile: rails (= 3.2.3) ruby depends on railties (= 3.2.3) ruby […]

Ruby is the best programming language in the world - Ruby on Rails.