similar to: Best practice on Javascript and rails

Displaying 20 results from an estimated 30000 matches similar to: "Best practice on Javascript and rails"

2011 Jul 07
2
Rails 3.1 + jQuery + jQuery UI = data is null
Trying to get jQuery UI to work with my rails 3.1 setup, but i keep getting errors that i cant see posted anywhere, this is driving my insane so please have a look => [application.js] // This is a manifest file that''ll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they''ll automatically // be
2011 May 27
7
Rails 3.1.rc1 + gem coffee-script - WEBrick and Unicorn hangs.
Environment: rvm ruby 1.9.2-p180 rails 3.1.rc1 Conditions: gem "coffee-script" # in Gemfile at least one file with .js.coffee (even empty inside) in app/assets Result: WEBrick or Unicorn hangs. Only kill -9 <pid> helps. P.S. What additional info should I provide? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
2010 Apr 09
2
dynamically linking to ajax.googleapis jquery
Hi I am using jquery and jqueryui in my application And in layout I use <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"%> <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" %> <%= stylesheet_link_tag
2012 Nov 02
2
jquery error in production precompiled
In my rails project, for production precompile I do : rake assets:precompile RAILS_ENV=production But it not work for jquery. In my firegub console, I got the error “ReferenceError: JQuery is not defined “ at production.rb # Disable Rails''s static asset server (Apache or nginx will already do this) config.serve_static_assets = true # Compress JavaScripts and CSS
2012 May 10
1
getting started with jQuery rails 3.2
Hi all, I''m trying to work out how to get started using some jQuery in my rails app. rails -v = 3.2.2 ruby -v = 1.9.3-p194 I''m only sporadically a web-developer, and still quite inexperienced with jQuery especially, so I may be making an obvious mistake. Essentially, I''ve done very little after creating a new app, I''ve learnt that jQuery is included by
2012 Aug 29
7
custom js in rails project
Hello, I have a rails project with one controller and one action, as simple as posible. And I''m trying to put some custom css and js to my own index.html.erb (not public/index.html.erb), I inluded this on the layout file: layout file: <!DOCTYPE html> <html> <head> <title>Volei</title> <%= stylesheet_link_tag "application", :media =>
2011 Jul 19
3
What does "require tree" do in Rails 3.1?
In Rails 3.1.... This is my application.css: /* *= require_self *= require_tree . */ This is my application.js: //= require jquery //= require jquery_ujs //= require jquery-ui //= require_tree . What does the "require_tree ." do? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web
2012 Jan 01
3
'require_tree .' does not seem to be including the available *.js files as expected. Why?
Hi, all, Happy new year :) Referring to http://guides.rubyonrails.org/asset_pipeline.html, it seems that ''require_tree .'' in myapp/app/assets/javascripts/ application.js will include all *.js files in the myapp/app/assets/ javascripts/. I have a few other *.js files in this directory : parts.js, makes.js and categories.js. Here''s an extract from the html file I
2011 Sep 01
7
couldn't find file 'jquery' rails 3.1 stable mountable engine
When I create a new engine in Rails 3.1 stable and then access the dummy app or the engine I get an error say that the app can''t find jquery. I''ve created the engine using rails plugin new coffee --mountable I''ve also created a basic controller in the engine and the dummy app. If I remove the javascript include tag, everything works. But with the tag there it just
2011 Nov 25
4
Sprockets File not Found Exception.
Hi Everyone, I was trying out some sample applications for Rails. I created some controllers and pages. But when i try to access one of them i get an exception on the webpage: --------------------------------------------------------------------- Sprockets::FileNotFound in Pages#home Showing c:/railscode/test_app/app/views/layouts/application.html.erb where line #6 raised: couldn''t
2011 Dec 05
9
jquery - word is not defined
Just starting out with a beginner book on jquery and the very first thing I am trying fails (has to be me) Rails 3.1 - other jquery things working including a poor example of drag & drop that is my ultimate target here but just simply trying to get every alternating row in a table to have a different css class So I''m using... app/assets/javascripts/people.js.coffee and put in...
2013 Jan 22
1
rails datatables refresh javascript
Hi I followed a railscast episode and got datatables up and running, beautifully along with the nice jquery-ui as in the front page. The main issue I''m having though is that I suck at CoffeeScript/JS ~_~ I''m trying get the datatables to reload every 1 second but I don’t see any request coming into my webserver for refreshes and hence, no refreshes on the web page itself.
2014 Apr 26
0
jquery_ujs.js 404
I am getting this annoying error which relates to jquery_ujs.js not being served. Any clues? This is the site link: http://test.kopy.com.br/home/index GET http://test.kopy.com.br/assets/jquery_ujs.js?body=1 404 (Not Found) index:11 GET http://ads.panoramtech.net/loader.js?client=tac net::ERR_BLOCKED_BY_CLIENT rev.js:4 Error in event handler for (unknown): Cannot read property 'state' of
2012 Mar 07
1
link_to with :remote=>true works when bound to "click" but not "ajax:beforeSend"
Hi. I am trying to do an ajax link in Rails 3.2.1 and jQuery. I am loading jquery.js and jquery_ujs.js. In my document ready, if I bind to the event "click," clicking the link fires an event, but if I click to ajax:beforeSend, it doesn''t. Nothing happens when you click the link in JQuery. The event does go to the controller, though. Works: $(document).ready(function(){
2009 Feb 26
7
javascript using jQuery.js and prototype.js doesnt work 2get
Hi........ M hving javascript "scripts.js" which uses jQuery.js in rails application. bt when it is used along with prototype.js, one of the javascripts which hs been included first in my application.rhtml fails... Do some1 hv any solution how to make both the scripts work 2gether... I tried using <script> jQuery.noConflict(); </script> bt of no use. problem
2012 Oct 05
1
Looking for Ruby on Rails Developers & Testers for Full time Job Opportunities
Hi All, Am looking for Ruby on Rails Developers and Testers for Full time Job Opportunities. Below are the available job opportunities:- 1. Position: Lead/Senior Application Engineer Location: San Mateo, CA Duration: Fulltime/ Contract to Hire Requirements: Developed usable, responsive applications in Ruby on Rails or Java / Spring / Hibernate Experience with UI frameworks (such as RoR and a
2013 Mar 10
2
css url paths when moving it to a different folder
Hey. Its simple quation, but have litle problem with this. Its my path for css - assets/content/stylsheets/my.css Its path picture for background url - assets/images/picture.gif I do the following in my.css background: transparent url(../../images/picture.gif). but the path is not correct, the image is not found. I tried with one ../ and easy images/picture.gif. Not work. When i add picture in
2010 Apr 10
2
Need a dropdown having "more.." option
I have a collection of products that I am showing in a dropdown. Now at the first view it will show only first 10 products in the dropdown with an option "more..." at last. if user clicks the "more..." he can see all the following products in that dropdown list (this is not any ajax request, just javascript show/hide). Of course the more... option will hide when showing all
2009 Apr 24
2
passing a value to a js function via button_to_function
I''ve got a table of what I call resources, want to show in a jQuery dialog a particular record when user clicks button in a row. in the table I''m doing: <td><%=button_to_function ''Show'',''showresource1()'',:class =>"ui-button ui-state-default ui-corner-all", :id => resource.id %></td> js: <script
2011 May 25
1
trouble using jQuery in Rails 3.0.7
I''ve tried to install JQuery a couple of times now, and I''ve followed the steps for Rails UJS mentioned here: https://github.com/rails/jquery-ujs The last time I went ahead and added jQuery UI as well: $ rails generate jquery:install --ui remove public/javascripts/prototype.js remove public/javascripts/effects.js remove public/javascripts/dragdrop.js