Re: [Rails] Ajax not working inside iteration

2017-01-02 Thread Walter Lee Davis
> On Jan 2, 2017, at 9:14 AM, 'krfg' via Ruby on Rails: Talk > wrote: > > I have a AtpRank model containing the first 100 Atp tennis players. > My goal is to create in the view a table listing all tennis players and their > attributes, along with a button

[Rails] Ajax not working inside iteration

2017-01-02 Thread 'krfg' via Ruby on Rails: Talk
I have a AtpRank model containing the first 100 Atp tennis players. My goal is to create in the view a table listing all tennis players and their attributes, along with a button for each player useful for the user to choose a list of tennis players. The home.html.erb code is below: <%

[Rails] Ajax editing of comments

2016-04-28 Thread Johnny Stewart
I have a rails 5 project and have followed this tutorial to implement commenting: http://railscasts.com/episodes/154-polymorphic-association-revised Comments are listed below the instance that they are associated with, I have creating and deleting comments working with ajax, but I can't work out

[Rails] Ajax form with partial view update

2016-04-09 Thread Rajinder Yadav
Hi I am trying to use partials to update my view with re-rendering. I created a form to submit using ajax I am using slim-rails in place of erb = simple_form_for(@landmark, remote: true) do |f| - if @landmark.errors.any? #error_explanation h2 =

[Rails] Re: Login modal using default rails ajax request not working with subdomains

2015-10-23 Thread Daniel Loureiro
your problem it's related with CORS. A little recipe to solve this: 1. install rack-cors gem. On your Gemfile: # Gemfile gem 'rack-cors', :require => 'rack/cors' 2. on shell: bundle install 3. on your application.rb: # application.rb ... config.middleware.insert_before 0, "Rack::Cors" do

[Rails] Re: Login modal using default rails ajax request not working with subdomains

2015-10-21 Thread Matt Jones
On Friday, 16 October 2015 03:37:03 UTC-4, Ruby-Forum.com User wrote: > > I am having a devise user model. > > To login I am using twitter-bootstrap modal.The modal is by default > hidden and shown only after an rails default ajax request is send to the > server. > > It works fine with

[Rails] Re: Login modal using default rails ajax request not working with subdomains

2015-10-20 Thread Chris Ward
Sorry to tell you, but this behavior is by design. You'll have to put it on the same subdomain as the accessed page or use a workaround like an API. This is actually a limitation of AJAX. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Login modal using default rails ajax request not working with subdomains

2015-10-16 Thread Akhil Sharma
I am having a devise user model. To login I am using twitter-bootstrap modal.The modal is by default hidden and shown only after an rails default ajax request is send to the server. It works fine with localhost and production. But when a user is on a subdomain(using acts_as_tenant) like

[Rails] Ajax 404 not found

2015-03-02 Thread Simioni Tanguy
hi everyone, i'm trying to make a post request with ajax in a js function. but here i am , 404 error , i really don't get why , help :3 Attachments: http://www.ruby-forum.com/attachment/10551/bug.png -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

Re: [Rails] Ajax 404 not found

2015-03-02 Thread Scott Ribe
On Mar 2, 2015, at 6:19 AM, Simioni Tanguy li...@ruby-forum.com wrote: hi everyone, i'm trying to make a post request with ajax in a js function. but here i am , 404 error , i really don't get why , help :3 Look in the logs, inspect your actual request, compare it to your routes. (In

Re: [Rails] Ajax 404 not found

2015-03-02 Thread Colin Law
On 2 March 2015 at 13:19, Simioni Tanguy li...@ruby-forum.com wrote: hi everyone, i'm trying to make a post request with ajax in a js function. but here i am , 404 error , i really don't get why , help :3 Attachments: http://www.ruby-forum.com/attachment/10551/bug.png Please in future

Re: [Rails] ajax will_paginate

2015-02-11 Thread Melb01
Yes, I found that too while googling,I think it is helpful Thx On Wednesday, February 11, 2015 at 8:58:17 AM UTC+1, gribanov...@gmail.com wrote: Hi! I think this will help you http://railscasts.com/episodes/240-search-sort-paginate-with-ajax вторник, 10 февраля 2015 г., 13:05:51 UTC+3

Re: [Rails] ajax will_paginate

2015-02-11 Thread gribanov . vadim . e
Hi! I think this will help you http://railscasts.com/episodes/240-search-sort-paginate-with-ajax вторник, 10 февраля 2015 г., 13:05:51 UTC+3 пользователь Melb01 написал: I already posed my code, I have a paginated list with will_paginate obtained with a search query the first page is shown

Re: [Rails] ajax will_paginate

2015-02-10 Thread Melb01
I already posed my code, I have a paginated list with will_paginate obtained with a search query the first page is shown correctly but the second is not shown with the js code because the query is not submitted for the second page with ajax code the params[:q] is nil when I navigate to the

Re: [Rails] ajax will_paginate

2015-02-09 Thread tamouse pontiki
Maybe what you want is something more like: if params[:q] @posts = Posts.find_with_q.paginate... else @posts = Posts.all.paginate... end respond_to do |format| ... end So your rendering isn't gated by whether there is a 'q' parameter; it only determines what gets set into @posts. On

Re: [Rails] ajax will_paginate

2015-02-09 Thread tamouse pontiki
... except with the right model name ... On Mon, Feb 9, 2015 at 10:24 AM, tamouse pontiki tamouse.li...@gmail.com wrote: Maybe what you want is something more like: if params[:q] @posts = Posts.find_with_q.paginate... else @posts = Posts.all.paginate... end respond_to do |format|

Re: [Rails] ajax will_paginate

2015-02-09 Thread Melb01
Thx for the answer but my problem is when I have a query, I am unable to go to the second page I get @posts as nil object, it is like paginating with ajax do not submit the query when changing the page rgds, On Monday, February 9, 2015 at 5:25:13 PM UTC+1, tamouse wrote: ... except with the

[Rails] ajax will_paginate

2015-02-09 Thread Melb01
Hi, I have an index page with searchbox and with pagination, it worked well when I tried to make pagination with javascript, itworked for the first page but not the second I think the problem is to pass the value of the search box to the script of pagination here is my code:

Re: [Rails] ajax will_paginate

2015-02-09 Thread tamouse pontiki
State your problem more clearly, as I don't understand. Better, post the code you have and what you're actually expecting. On Mon, Feb 9, 2015 at 11:14 AM, Melb01 melaggo...@gmail.com wrote: Thx for the answer but my problem is when I have a query, I am unable to go to the second page I get

[Rails] How to implement fragment caching with rails ajax call?

2014-12-01 Thread Logesh m
I have a view where I have multiple things to load and I make an ajax call from the index view to add the content on success of each call and I would like to cache each of it so as to make the performance better. *index.html.erb* div id=show1 /div script $.ajax({ type : GET,

Re: [Rails] How to implement fragment caching with rails ajax call?

2014-12-01 Thread Vivek Sampara
You have to use fragment caching http://api.rubyonrails.org/classes/ActionController/Caching/Fragments.html and write a private method like def sample_from_cache @cache = read_fragment(:page = params[:page], :per_page = @per_page) return @cache unless @cache.blank? @cache =

Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-20 Thread Pepeng Agimat
Thank you so much Mr. Colin I solved the problem. I forget i used the instance of the customer [def create @customer = Customer.find(params[:customer_id]) @project = Customer.projects.create(project_params) end] .. It should be [def create @customer = Customer.find(params[:customer_id])

Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-20 Thread Pepeng Agimat
Thank you so much Mr. Sampath. I solved the problem. I forget that i should used the instance of the customer [def create @customer = Customer.find(params[:customer_id]) @project = Customer.projects.create(project_params) end] .. It should be [def create @customer =

Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-19 Thread Sampath Munasinghe
Use customer has_many: :projects accepts_nested_attributes_for :projects and then make customer view to handle project data or ( if u need above approach ) add customer id to above _form.html. if u need further help, please let me know. :) On Sat, Oct 18, 2014 at 11:43 PM, Colin Law

[Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-18 Thread Pepeng Agimat
Good day, I'm a beginner in rails I already develop a simple app in rails but i want to upgrade the app to be an ajax, I already created the first model customer but in the second model project where customer has many projects and project belongs_to customer, those ajax form modal that i copy

Re: [Rails] Ajax bootstrap modal in rails 4.. Newbie here!

2014-10-18 Thread Colin Law
On 18 October 2014 15:09, Pepeng Agimat eebasadr...@gmail.com wrote: Good day, I'm a beginner in rails I already develop a simple app in rails but i want to upgrade the app to be an ajax, I already created the first model customer but in the second model project where customer has many

Re: [Rails] Rails AJAX slow compared to Node.js and websockets complex to implement in rails ?

2014-03-06 Thread Andreas Wenk
just some bikeshedding ... sry - your answers are all very good! On Wednesday, March 5, 2014 6:40:16 PM UTC+1, mike wrote: By default, if you run this in Ruby, you will get what you expect. It will open the file, then read its contents. Javascript won't. It will issue the command to the

Re: [Rails] Rails AJAX slow compared to Node.js and websockets complex to implement in rails ?

2014-03-06 Thread mike
On Thursday, March 6, 2014 5:58:23 AM UTC-5, Andreas Wenk wrote: just some bikeshedding ... sry - your answers are all very good! On Wednesday, March 5, 2014 6:40:16 PM UTC+1, mike wrote: By default, if you run this in Ruby, you will get what you expect. It will open the file, then

Re: [Rails] Rails AJAX slow compared to Node.js and websockets complex to implement in rails ?

2014-03-05 Thread mike
On Sunday, March 2, 2014 7:49:44 AM UTC-5, Gurpreet Luthra wrote: Have you read this: http://greenash.net.au/thoughts/2012/11/nodejs-itself-is-blocking-only-its-io-is-non-blocking/ Its about having a non-blocking system which helps in increasing speed of execution.. it not about the

Re: [Rails] Rails AJAX slow compared to Node.js and websockets complex to implement in rails ?

2014-03-02 Thread Gurpreet Luthra
Have you read this: http://greenash.net.au/thoughts/2012/11/nodejs-itself-is-blocking-only-its-io-is-non-blocking/ Its about having a non-blocking system which helps in increasing speed of execution.. it not about the language. Depends on whether your AJAX calls are calling blocking systems, or

[Rails] Rails AJAX slow compared to Node.js and websockets complex to implement in rails ?

2014-03-01 Thread Jedrin
I have heard alot about Node.js and watched a few tutorials and read some stuff. I get the impression that in certain situations AJAX calls with node.js is alot faster than with rails. I also have somewhat of an impression that with Rails web sockets are complicated to implement but with

[Rails] Ajax Search

2013-07-18 Thread Avi
Hello All, I am using Kaminari gem for pagination. I want to do a ajax search on the same page of the data in the table which is a list of images with names. Can anyone suggest anything ? Thanks, Avi -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] ajax form submission

2013-07-09 Thread mack gille
hi, i have popup input field that is address when i enter address and submit a button then it need to save with out refreshing the page. it may use javascript or ajax.how can i store the address field in my table without refreshing the page. please clarify me. thankyou -- Posted via

[Rails] Ajax - the Rails way!

2013-05-29 Thread Tommy Ng
I find the Rails online documentation at http://guides.rubyonrails.org/form_helpers.html#dealing-with-ajax; difficult to follow, due to the way the information is organized. For example, I wanted to look for Ajax, so I looked under View. But, because the material is organized in the MVC format,

Re: [Rails] Ajax - the Rails way!

2013-05-29 Thread Norbert Melzer
2013/5/30 Tommy Ng li...@ruby-forum.com % form_tag({:controller = main, :action = contact}, :remote = There should be an equal sign (=) just after the percent to tell erb, that it should output something true, :update = result) do % Name:br/%= text_field_tag(:name, :, :id = name)

[Rails] ajax breaking multiline select habtm parameters

2013-02-19 Thread jeb
I have a journalist and publication model related with a habtm. In the edit journalist form there is a multiline select for publications. When :remote = false this works well, the parameter for the publications looks like: publication_ids=[, 4256,4271] BUT if I use :remote = true the parameter

[Rails] AJAX to change session data

2013-02-09 Thread Dave Castellano
Hi, I am trying to figure out how to implement AJAX to set a session variable when a user selects from a dropdown. I have not used AJAX before. My dropdown code is: %= collection_select( :question, :subject_id, Subject.order(:title), :id,

[Rails] ajax..

2012-12-11 Thread Werner
Hope it is o.k. when I post a js/ ajax related to rails.. question here. I have a form with a select field. What I have in mind is to display an inline div with some db related infos when the select_field has changed. form %= f.collection_select :parent_id, Project.all, :id, :project_name,

Re: [Rails] ajax..

2012-12-11 Thread Jordon Bedwell
On Mon, Dec 10, 2012 at 6:23 AM, Werner webagentur.la...@googlemail.com wrote: Hope it is o.k. when I post a js/ ajax related to rails.. question here. I have a form with a select field. What I have in mind is to display an inline div with some db related infos when the select_field has

[Rails] Ajax response in a modal box

2012-12-05 Thread nikhil rn
Hello guys, I was wondering if I could display the ajax response in a modal box. I could not find anything satisfying on the web. I am new to ajax. This is what I was trying. $(document).ready(function() { var clicked1; $(.inline).click(function(e) { clicked1 = $(this).text(); $.ajax({

Re: [Rails] Ajax

2012-11-20 Thread Werner
Hi jim As I am using remote: true I created a update.js.erb and a respond_to do |format| block. Copied the format html ocde into the update.js.erb and the update process is still working.. so far so good. But it is unclear to me how to update the Model.where(model_id: id).sum(attribute) query

Re: [Rails] Ajax

2012-11-20 Thread Jim Ruther Nill
Hi! On Tue, Nov 20, 2012 at 4:53 PM, Werner webagentur.la...@googlemail.comwrote: Hi jim As I am using remote: true I created a update.js.erb and a respond_to do |format| block. Copied the format html ocde into the update.js.erb and the update process is still working.. so far so good.

Re: [Rails] Ajax

2012-11-20 Thread Werner
Sure.. def edit @booking = Booking.new @project = Project.find(params[:id]) @main_hours = main_hours_sum(@project.id) ... end def main_hours_sum(id) Booking.where(project_id: id).sum(hour) end def update respond_to do |format| format.js end end

Re: [Rails] Ajax

2012-11-20 Thread Jim Ruther Nill
On Tue, Nov 20, 2012 at 5:46 PM, Werner webagentur.la...@googlemail.comwrote: Sure.. def edit @booking = Booking.new @project = Project.find(params[:id]) @main_hours = main_hours_sum(@project.id) ... end def main_hours_sum(id) Booking.where(project_id:

Re: [Rails] Ajax

2012-11-20 Thread Werner
o.k. Now it is like that: def update if params[:booking_ids] params[:booking_ids].each do Booking.update(params[:booking].keys, params[:booking].values).reject { |p| p.errors.empty? } end end respond_to do |format| format.js{ @project =

Re: [Rails] Ajax

2012-11-20 Thread Jim Ruther Nill
On Tue, Nov 20, 2012 at 7:48 PM, Werner webagentur.la...@googlemail.comwrote: o.k. Now it is like that: def update if params[:booking_ids] params[:booking_ids].each do Booking.update(params[:booking].keys, params[:booking].values).reject { |p| p.errors.empty? }

Re: [Rails] Ajax

2012-11-20 Thread Werner Laude
here...is the essential def edit @booking = Booking.new @project = Project.find(params[:id]) @partprojects = Project.find_all_by_parent_id(@project.id) @bookings = Booking.zwischen(start, ende) @main_hours = main_hours_sum(@project.id) @part_hours =

Re: [Rails] Ajax

2012-11-20 Thread Jim Ruther Nill
On Tue, Nov 20, 2012 at 8:45 PM, Werner Laude webagentur.la...@googlemail.com wrote: here...is the essential def edit @booking = Booking.new @project = Project.find(params[:id]) @partprojects = Project.find_all_by_parent_id(@project.id) @bookings =

Re: [Rails] Ajax

2012-11-20 Thread Werner Laude
Am 20.11.2012 um 13:55 schrieb Jim Ruther Nill jvn...@gmail.com: I try to explain.. I have this edit form where I can edit hours On top of the insert form itself I give Information about the complete amount of hours. So I ask for the complete amount of hours by asking for the part / main

Re: [Rails] Ajax

2012-11-20 Thread Jim Ruther Nill
On Tue, Nov 20, 2012 at 9:10 PM, Werner Laude webagentur.la...@googlemail.com wrote: Am 20.11.2012 um 13:55 schrieb Jim Ruther Nill jvn...@gmail.com: I try to explain.. I have this edit form where I can edit hours On top of the insert form itself I give Information about the complete

Re: [Rails] Ajax

2012-11-20 Thread Werner Laude
Am 20.11.2012 um 14:19 schrieb Jim Ruther Nill jvn...@gmail.com: $('#main-hours span').text('%= @main_hours %'); perfect.. thanks a lot.. Now I get the idea.. Werner Laude webagentur.la...@gmail.com -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] Ajax

2012-11-20 Thread Jim Ruther Nill
On Tue, Nov 20, 2012 at 9:31 PM, Werner Laude webagentur.la...@googlemail.com wrote: Am 20.11.2012 um 14:19 schrieb Jim Ruther Nill jvn...@gmail.com: $('#main-hours span').text('%= @main_hours %'); perfect.. thanks a lot.. Now I get the idea.. Cheers! At least we nail that one :)

Re: [Rails] Ajax

2012-11-20 Thread Werner Laude
yes. thanks a lot.. The one more thing... I try to complete that respond_to do |format| format.js{ @project = Project.find(params[:id]) @main_hours = main_hours_sum(@project.id) @part_hours = part_hours_sum(@partprojects) @all_hours = @main_hours +

[Rails] Ajax

2012-11-19 Thread Werner
On my edit page I can update values using ajax. In my edit action I also have something like: Model.where(model_id: id).sum(attribute) As the edit action is not executed anymore, I dont get a proper result after I add some new value, have to reload the page. How is the best way to actualize

Re: [Rails] Ajax

2012-11-19 Thread Jim Ruther Nill
On Mon, Nov 19, 2012 at 10:25 PM, Werner webagentur.la...@googlemail.comwrote: On my edit page I can update values using ajax. In my edit action I also have something like: Model.where(model_id: id).sum(attribute) As the edit action is not executed anymore, I dont get a proper result after

Re: [Rails] Ajax test not working

2012-10-26 Thread Rob Biedenharn
On Oct 25, 2012, at 4:32 PM, Jason Walsh wrote: webber han wrote in post #1081214: Jason Walsh wrote in post #1080993: Am having real probs trying to use Ajax with my Rails app. I have set up a test as follows: in javascript file: window.onload = function() {

[Rails] Ajax test not working

2012-10-24 Thread Jason Walsh
Am having real probs trying to use Ajax with my Rails app. I have set up a test as follows: in javascript file: window.onload = function() { $('#test').bind('ajax:success', function() { alert(success); }; } in view: %= link_to test, { :action = :getDiagram }, :remote = true,

[Rails] AJAX truncated response on Phusion Passenger v3.0.17 on CentOS v6.x

2012-10-23 Thread Jiten Savla
Our application deployed on Phusion Passenger version 3.0.17 server on CentOS 6.x box makes a AJAX call which returns a large response ranging from 1MBs to 8 MBs. It works fine a lot of time but we have seen truncated response from the server inconsistently. Its breaks are different places

[Rails] Ajax in rails

2012-10-02 Thread ruby rails
I am building a task management application in ROR. I am new to ROR and learning it. While adding tasks, I need to select a projects drop down list and the team members of that project will be shown as drop down. I am using ajax for it. But I see that in the response data I am getting the complete

Re: [Rails] Ajax in rails

2012-10-02 Thread Walter Lee Davis
On Oct 2, 2012, at 5:58 AM, ruby rails wrote: I am building a task management application in ROR. I am new to ROR and learning it. While adding tasks, I need to select a projects drop down list and the team members of that project will be shown as drop down. I am using ajax for it. But I see

[Rails] ajax, erb, uri, query string

2012-07-10 Thread Scott Ribe
Is there a cleaner way to build the url in the following snippet? $(function() { $('#name').change(function() { $.ajax({ url: %= url_for({action: 'lookup'}) % + ?term= + this.value, ... } }) }) }) Note that I should not use a hard-coded URL, because this app

Re: [Rails] ajax, erb, uri, query string

2012-07-10 Thread Javier Quarite
On Tue, Jul 10, 2012 at 4:42 PM, Scott Ribe scott_r...@elevated-dev.comwrote: Is there a cleaner way to build the url in the following snippet? $(function() { $('#name').change(function() { $.ajax({ url: %= url_for({action: 'lookup'}) % + ?term= + this.value, ...

[Rails] Ajax Partials not refreshing | How to start downloaded code

2012-06-24 Thread richard reyes
Hi All, Greetings to all. Noob RoR dev here and trying to learn it from a book. Here it is: http://pragprog.com/book/rails4/agile-web-development-with-rails I am having trouble working on some of the chapters and I have downloaded the src codes and want to test if it works as it should. Now

Re: [Rails] rails ajax issues

2012-05-29 Thread amruby
On Thursday, 24 May 2012 08:32:42 UTC-4, azizmb.in wrote: Hi Vishnu Users on this group are not here to *give* you solutions, rather to point you in the correct direction. To point you in the correct direction, you need to respond to the js

Re: [Rails] rails ajax issues

2012-05-29 Thread azizmb.in
Your problem is in your jQuery call. You need to use the value returned by the server and update the DOM in your success call. Have a look at these tutorials: http://wabism.com/ajax-tutorial-with-jquery/ http://viralpatel.net/blogs/2009/04/jquery-ajax-tutorial-example-ajax-jquery-development.html

[Rails] rails ajax issues

2012-05-24 Thread amruby
Hi * *I think this is my 4 or 5th post about the ajax issues with my rails code. But i couldn't rectify my issues sofar. problem is, In my pages.html.erb have one text field and button. when i click on that button, the text field value will get into the controller through ajax,so after the

Re: [Rails] rails ajax issues

2012-05-24 Thread azizmb.in
Hi Vishnu Users on this group are not here to *give* you solutions, rather to point you in the correct direction. To point you in the correct direction, you need to respond to the js formathttp://whoneedsactions.com/blog/2010/10/24/jquery-ajax-with-rails-respond-to-format-dot-js/, and then

[Rails] ajax issue with rails

2012-05-16 Thread amvis
$(.sub123).click(function() { var mnum = $(#mnum).val(); var dataString = 'value='+ mnum; if(mnum=='') { $('.error').fadeIn(300).show(); $('.error').fadeOut(3000); } else { $.ajax({ type: GET, url: http://localhost:3000/pages/show/;, data: dataString , success: function(){

Re: [Rails] ajax issue with rails

2012-05-16 Thread Jeremy Walker
On 16 May 2012 11:55, amvis vgrkrish...@gmail.com wrote: $(.sub123).click(function() { var mnum = $(#mnum).val(); var dataString = 'value='+ mnum; if(mnum=='') { $('.error').fadeIn(300).show(); $('.error').fadeOut(3000); } else { $.ajax({ type: GET, url:

Re: [Rails] ajax issue with rails

2012-05-16 Thread amvis
On Wednesday, 16 May 2012 07:24:36 UTC-4, iHiD wrote: On 16 May 2012 11:55, amvis vgrkrish...@gmail.com wrote: $(.*sub123*).click(function() { var mnum = $(#mnum).val(); var dataString = 'value='+ mnum; if(mnum=='') { $('.error').fadeIn(300).show(); $('.error').fadeOut(3000); }

[Rails] AJAX and Jqery

2012-05-02 Thread AJ
Hi iam trying ti implement a simple search functionality with AJAX and Jquery, iam able to see the responce in the console, however the html doen not change, iam getting this status message 304 Not Modified , what iam i doing wrong. i can provide the code if someone wants Thanks in

Re: [Rails] AJAX and Jqery

2012-05-02 Thread Lauro Caetano
This is a good resource: http://railscasts.com/episodes/240-search-sort-paginate-with-ajax 2012/5/2 AJ akshar.jamgaon...@gmail.com Hi iam trying ti implement a simple search functionality with AJAX and Jquery, iam able to see the responce in the console, however the html doen not change, iam

[Rails] Ajax Pagination, repeating

2012-04-07 Thread Antony Shimmin
Hi there, I have Ajax Pagination (sort of) working on my Ruby on Rails Project. However my problem is, is that it repeats each page x number of times, x being equal to the amount of records I have on each page. So lets say for example prior to the Ajax Pagination, I had 12 records per page, now

Re: [Rails] Ajax Pagination, repeating

2012-04-07 Thread Colin Law
On 7 April 2012 20:07, Antony Shimmin li...@ruby-forum.com wrote: Hi there, I have Ajax Pagination (sort of) working on my Ruby on Rails Project. However my problem is, is that it repeats each page x number of times, x being equal to the amount of records I have on each page. So lets say

Re: [Rails] Ajax Pagination, repeating

2012-04-07 Thread Colin Law
On 7 April 2012 20:47, Colin Law clan...@googlemail.com wrote: On 7 April 2012 20:07, Antony Shimmin li...@ruby-forum.com wrote: Hi there, I have Ajax Pagination (sort of) working on my Ruby on Rails Project. However my problem is, is that it repeats each page x number of times, x being

[Rails] AJAX form (using simple_form) with preserved error validation

2012-04-06 Thread Abram
I know it's unlikely that anyone will check this link, but here's hoping http://stackoverflow.com/questions/10051050/ajax-form-using-simple-form-with-preserved-error-validation Sorry, too hard to explain without showing the pics. Abram -- You received this message because you are subscribed

[Rails] ajax submitting twice very weird 3.2.1

2012-03-01 Thread Jamal Soueidan
Hi, I have been using Rails for long time now and never faced this issue that ajax calls get's called twice and sometimes up to 5x times for weird reason. Started DELETE /campaigns/26/segments/44 for 127.0.0.1 at 2012-03-01 11:10:20 +0100 Started DELETE /campaigns/26/segments/44 for 127.0.0.1

Re: [Rails] Ajax Update: error: undefined method `model_name'

2012-02-18 Thread Peter Vandenabeele
On Sat, Feb 18, 2012 at 7:26 AM, Soichi Ishida li...@ruby-forum.com wrote: Rails 3.1.3 I am not sure Rails can do what I want to do. I have a form for update like, %= form_for script, :remote = true do |f| % %= f.hidden_field :video_id % %= f.text_field :startp, :readonly =

[Rails] Ajax Update: error: undefined method `model_name'

2012-02-17 Thread Soichi Ishida
Rails 3.1.3 I am not sure Rails can do what I want to do. I have a form for update like, %= form_for script, :remote = true do |f| % %= f.hidden_field :video_id % %= f.text_field :startp, :readonly = true % %= f.text_field :text % %= f.submit update % % end %

[Rails] Ajax save: Completed 500 Internal Server Error NoMethodError

2012-02-15 Thread Soichi Ishida
Rails 3.1.3 I get the following error when Ajax 'save' action is executed. Started POST /scripts for 127.0.0.1 at 2012-02-16 09:23:05 +0900 Processing by ScriptsController#create as JS Parameters: {utf8=✓, authenticity_token=9rMiPwxlQrXiAIgUy8Qqe77KXDezXmpLF4WLupZb5ME=,

Re: [Rails] Ajax save: Completed 500 Internal Server Error NoMethodError

2012-02-15 Thread Michael Pavling
On 16 February 2012 00:32, Soichi Ishida li...@ruby-forum.com wrote: It says 'NoMethodError', but in the controller,  def create    @script = Script.new(params[:script])    respond_to do |format|      if @script.save                             #=44: HERE! What does the Script model

Re: [Rails] Ajax save: Completed 500 Internal Server Error NoMethodError

2012-02-15 Thread Michael Pavling
On 16 February 2012 00:37, Michael Pavling pavl...@gmail.com wrote: On 16 February 2012 00:32, Soichi Ishida li...@ruby-forum.com wrote: It says 'NoMethodError', but in the controller,  def create    @script = Script.new(params[:script])    respond_to do |format|      if @script.save        

[Rails] Ajax rendering partial ( fields in form)

2012-02-13 Thread Erwin
when rendering a piece of my form after an Ajax call, I get the error ActionView::Template::Error (undefined local variable or method `f' for ##Class: controller def change_price new_price = @tax_amount = new_price * I18n.t(:standard_tax_rate) render

[Rails] Ajax confusion

2012-01-23 Thread Paul Bergstrom
I'm a bit confused about ajax. If I have a link, do I add the href, data-remote=true and data-method in there? Or do I make the actual call in a separate script with $.ajax({})? Or both? The same thing with a form. Is that suppose to have an action path and an jquery axaj url: ... path at the

[Rails] Ajax login secure?

2012-01-03 Thread Pirukire
Is Ajax login secure? I mean, does it have the same security checks as a normal login? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit

Re: [Rails] Ajax login secure?

2012-01-03 Thread Philip Hallstrom
Is Ajax login secure? I mean, does it have the same security checks as a normal login? It's no more or less secure than normal (by which I assume you mean simple POST) login. -philip -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Ajax dialogs with jquery

2011-12-04 Thread Nike Mike
Hi, In my application, we are calling a dialog box to submit a value through ajax.After submit how to show the welcome message in the same dialog. In my views file at the first the dialog block is in hidden mode.On clicking an anchor we are displaying the dialog block form.Through Ajax we are

Re: [Rails] Ajax dialogs with jquery

2011-12-04 Thread Jim Ruther Nill
On Mon, Dec 5, 2011 at 9:13 AM, Nike Mike li...@ruby-forum.com wrote: Hi, In my application, we are calling a dialog box to submit a value through ajax.After submit how to show the welcome message in the same dialog. In my views file at the first the dialog block is in hidden mode.On

[Rails] ajax question

2011-11-29 Thread DmitryS
Hello, could you please explain what's wrong with this code: Rails 3.1.1 skills_controller.rb class SkillsController ApplicationController # GET /skills # GET /skills.json def index @skills = Skill.all respond_to do |format| format.html # index.html.erb

[Rails] AJAX vote update for a nested resource

2011-10-13 Thread Sean Six
I created a house scaffold which has many reviews and the reviews can be voted on. All the reviews for a house are shown on the house show page. Then each review has a vote button and a display to show the current number of votes. I would like the vote button to vanish and the vote count to

[Rails] ajax problem when switching from prototype to jquery

2011-09-25 Thread David Carlton
I have an old Rails application that I'd previously upgraded to Rails 3.1 with a lot of legacy features left on; now I want to switch to using jQuery instead of Prototype, and switch to using the asset pipeline. I'm trying to tackle the first of those; no idea if that's wise, maybe I should start

[Rails] Ajax and rails 3 UJS (jquery)

2011-09-06 Thread K.M.
Hi, guys, I'm in the midst of moving an app from rails 2.3.8 to rails 3.0.9. Sadly, rails 3 no longer has javascript generators and I'm now forced to do more javascript. For my project, I have selected jQuery as the javascript framework for my rails 3.0.9 app. What I have done to have my

[Rails] Ajax sends PUT for updates, Rails complains that it's POST :(

2011-06-24 Thread sc-kitten
Hi, I am not sure what is happening... But suddenly my apps in Rails started behaving weirdly. Non of the Ajax PUT requests are received as PUT anymore and instead Rails complains that I am sending POST... I also noticed that instead of the correct module, for example PUT request is sent via Ajax

Re: [Rails] Ajax sends PUT for updates, Rails complains that it's POST :(

2011-06-24 Thread Walter Lee Davis
On Jun 23, 2011, at 5:00 PM, sc-kitten wrote: Hi, I am not sure what is happening... But suddenly my apps in Rails started behaving weirdly. Non of the Ajax PUT requests are received as PUT anymore and instead Rails complains that I am sending POST... I also noticed that instead of the correct

Re: [Rails] Ajax sends PUT for updates, Rails complains that it's POST :(

2011-06-24 Thread Gintautas Šimkus
What is your JS code for sending the request? 2011/6/24 Walter Lee Davis wa...@wdstudio.com On Jun 23, 2011, at 5:00 PM, sc-kitten wrote: Hi, I am not sure what is happening... But suddenly my apps in Rails started behaving weirdly. Non of the Ajax PUT requests are received as PUT

[Rails] jquery rails ajax

2011-05-12 Thread esdevs
so I am using jquery and updating a dom element with $('#thelist').replaceWith(%= escape_javascript(render(:partial = @deals)) %); this works fine except it is not hitting the server so if @deals is updated, it is not refreshing and showing the latest version. My question is how to ajax this

[Rails] Re: jquery rails ajax

2011-05-12 Thread Tim Shaffer
That makes sense. When your page loads, the value of @deals is inserted in the JavaScript that is sent to the client. As you noticed, since your JavaScript code never makes a request back to the server, it just keeps calling replaceWith on the value of the original @deals. The easiest way is

Re: [Rails] Ajax request

2011-05-11 Thread Frederick Cheung
On 10 May 2011, at 23:48, Mlle emsto...@gmail.com wrote: Hi I'm trying to create an Ajax request that displays a list of inventory items resulting from a search on a keyword. How can I insert the list of inventory items using a partial or a string of html onto the page following the

[Rails] Ajax request

2011-05-10 Thread Mlle
Hi I'm trying to create an Ajax request that displays a list of inventory items resulting from a search on a keyword. How can I insert the list of inventory items using a partial or a string of html onto the page following the ajax request? The following doesn't work because I can't use a

[Rails] Ajax request not working in IE, Rails 3

2011-03-09 Thread vikas rao
Hello I have a below code in rails 3 which works fine on all other browsers except IE There is a remote form, on creation it passes the XHR request in all other browsers but in IE it doesn't passes XHR request and searches for the HTML page, thus sometime gives Missing template error and

  1   2   3   >