similar to: Dynamic counter?

Displaying 20 results from an estimated 60000 matches similar to: "Dynamic counter?"

2007 May 10
5
Pagination has many through problems
I have searched for days for an example that demonstrates what i would like to do, and this morning i thought i''d worked it out, but no....here''s what i have: Controller ========== class ProfilesController < ApplicationController def friends current_user.profile.friends end def list_friends @profile_pages, @profiles = paginate( friends, :per_page => 10) end end
2006 Sep 25
1
ActiveRecord instead of direct sql execution
Hi all, I have 2 tables and a standard one-to-many association. How do I substitute the following sql with ActiveRecord calls so that it uses just one sql statement: update geo_entities set terminal_id = 3 where id = 10 or id = 23 or id = 87; Thank you! Regards, Yuri Leikind --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2008 Jan 02
3
Submitted a patch, got pluses, what now?
Hello Rails people, I submitted a patch recently to get rid of an annoying exception raised when an AR object is created - http://dev.rubyonrails.org/ticket/10556 , had some people review it, got some pluses... What am I supposed to do now? Can anybody advise or just review the patch and take care of the issue? Thanks! -- Best regards, Yuri Leikind
2004 Jul 20
7
radiobuttons are weird in 1.2.x series
Hello all, Run groupbox.rb example in any of the two alpha versions and click the radiobutton in the upper right group box (those named Hilvesum 1, Hilversum 2, etc). You''ll notice that once a radiobutton is checked, it remains checked when some other radiobutton is checked. What''s the reason? Thank you. -- Best regards, Yuri Leikind
2008 May 08
1
Eager loading of association extensions
Hello all, Is it possible to do eager loading of association extensions? That is, the following code produces one SQL query: cat = ProductCategory.find(:first, :include => :pricing_rules) cat.pricing_rules But if in ProductCategory I have an association extension like this: has_many :pricing_rules do def applicable() find(:all).select(&:applicable?) end end the
2007 May 20
2
Newbie question - self.var OR @var in ActiveRecord
I started learning rails by following the agile way. It comes to the point where it puzzles me. class Puzzle < ActiveRecord::Base # virtual var, not existing in the database def var @var end def var=(foo) @var= foo @var_in_database = @var + 1 # var_in_database exists in database end end Then when I do a save of this model it does nothing. I know that if I instead put
2006 Jun 12
3
Multiple Form Fields with Same Model?
Hello, I''m trying to create a form that will allow a user to submit a list of phone numbers, but the list is dynamically created. Thus allowing my form to submit an unknown number of phone numbers. Here is some of the code I have been trying: <%= collection_select( "phone[]", "phone_type_id", PhoneType.find(:all, :order => "position"),
2006 Mar 03
1
Dynamic JS updating / data-preloading using ajax
Hi all, I''m building an application which uses mostly ajax to update the sections of the page. Now I''ve come to some thoughts on how to make the ajax-handling more efficient / less buggy. Currently, when the page loads up, I start some "new Ajax.Updater"-stuff to fill some sections with content from the db. I also registered watchers which also start nearly the same
2008 May 07
10
a little problem with prototype and IE7
''m from cartagena Colombia(south america) .... i''m learning prototype, i have a little problem using Ajax.Updater. i have this code in html page : <head> <script src="prototype.js" language="javascript" type="text/ javascript"> </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
2011 Dec 17
7
How to fire Ajax call from Form_for
I am learning Rails 3 and need some help on Ajax part. I am trying to accomplish the following: There is a textarea on the page which has a length of letters constraint, say 100. Every time a symbol is typed there,a nearby label tells you how many letters you have left. I plan to use Ajax to do this. I googled for a few hours and could not figure out how to do this. So far what I have done is
2007 Mar 01
6
prototype ajax.updater response bigger than 10k on safari
Hi All, Safari crashes everytime my ajax response is bigger than 10k, i traced it down and found out that it breaks when evalScript is being called, maining when extractScript is trying to match the regex..... is this a known bug on safari? if yes is there anyway to get around it? thanks in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2007 Jan 27
5
Prototype not processing javascript
I''m trying to change over from Rails 1.1.6 to 1.2.1 and have discovered that either something is wrong with Prototype of else something has changed that I am not aware of and cannot find documentation on. (I just joined this group, so if this has already been cussed and discussed here or in another list then please point me in the right direction.) I am trying to use the
2007 May 08
5
Which version of Ubuntu to use with Rails
Hello, This is a question for folks who are using Ubuntu to host your Rails apps. Which version of Ubuntu do you use? Do you use the ''Dapper'' release (6.0.6) perhaps due to the long term support (LTS), or are you using the latest release ''Feisty'' (7.0.4)? Or maybe a better way to ask the question is, is there a preferred version of Ubuntu to use with Ruby
2008 Mar 22
4
Ajax.Updater not fully work in IE7
My code snapshot: correct work in FF , Opera and Safari, but in IE7 - isn''t return result <form action="test.php" method="POST"> <div id="country" style="border: 1px solid #ccc; width: auto"></div> <br/> <a href="javascript:getTest()">test</a> </form> <script
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
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
For the life of me I can''t figure this one out, although I can''t find anyone else who''s attempted to do this, and probably with good reason. Context: blog using AJAX What I''m trying to do: when the user initially saves a blog entry, or when auto-saving, I want subsequent saves to not create a new blog entry Why I can''t just reload the partial: -
2007 Nov 29
5
Dynamic JS or RJS ?
Hi, while I search the net for hints I leave this here, probably you will be faster than me finding an answer. The next: I have a static site where I embed a player using an external js The html: <script type="text/javascript" src="http://www.mysite.com/scripts/player.js"></script> The JS: if(navigator.userAgent.indexOf("Opera")!=-1){
2008 Apr 04
8
Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
Hi, I want to have a page in my Ruby on Rails application that is like a dynamic / updateable data grid. Like a matrix or spreadsheet segment (x rows, y columns) which one can click in any of the cells and make an update, which triggers some AJAX code to fire off the update, and then the responses come back and update whatever else needs updating based on this change. Is there a prototype
2009 Aug 28
4
InvalidAuthenticityToken
Hi guys What does the below line says ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): -e:2:in `load'' -e:2 Please guide me -- Karthik.k Mobile - +91-9894991640
2008 Jan 04
6
Ajax.Request: onFailure vs. onException
Hello All, I''m trying to capture the exception message that my server application is providing in response to my Ajax.Request. However, I''m confused as to when onFailure is fired vs. onException. The onException handler has access to the javascript exception object and I''d understood that it was only called when the dispatch fails. Not sure what exactly that means