similar to: RJS-Template and link_to_remote

Displaying 20 results from an estimated 100 matches similar to: "RJS-Template and link_to_remote"

2006 Jan 30
2
problem redefining module method
I''m having a problem redefining a method in one of my modules. Lets say I have this module in /lib: module Hello def say_hello "hello" end end And one of my ActiveRecord models mixes it in like: class Item < ActiveRecord::Base include Hello end This works fine, I can call @item.say_hello just fine. But when I try to redefine the method: class Item <
2010 Feb 11
2
LinkingTo and C++
Hello, I've been trying to make LinkingTo work when the package linked to has c++ code. I've put dumb packages to illustrate this emails here ; http://addictedtor.free.fr/misc/linkingto Package A defines this C++ class: class A { public: A() ; ~A() ; SEXP hello() ; } ; Package B has this function : SEXP say_hello(){ A a ; return a.hello() ; } headers of package A are copied
2006 Mar 07
3
STI and unit testing
Hi all, I''m having a bit of a problem with unit testing. I''ve simplified my models to try and get my head round it but I''m still struggling. I''m using STI and trying to write tests for the extended models (code below). I''ve written test cases for the extended models which themselves extend the test case for the parent model, so BarTest extends
2006 Feb 14
3
Can Ajax updates more than one <div>?
Hi, I wish to know, is it possible that Ajax can update more than one zone "<div>"???? like : <%= link_to_remote("Title", :update => ''mydiv0'', :url => {:action=>:say_hello} )%> <div id="mydiv0"> to be changed one</div> <div id="mydiv0"> to be changed two</div> When I execute the code, only
2008 Jan 17
6
how to control self.method access
i think self.method just like class method,so if i want to define it as a private method,i should use private_class_method :my_method but i found follow code in < <Agile Web Development with Rails>> private def self.hash_password(password) Digest::SHA1.hexdigest(password) end just a mistake or there have some thing which i cannot get?
2006 Jan 10
8
first ajax demo in Rails book - does it work for anyone?
Just tried the first AJAX example in the rails book (p.391-392, the ''word guessing'' thing), and the AJAX partial used seems to render as a full page. I''m not sure whether it''s a) a partial bug b) some interaction between ajax and partials c) a change since the book came out or d) pilot error I''ve checked the errata pages and it''s flagged up
2006 Oct 01
9
How to create a very simple form
Hi all, I would like to create a very simple form with RoR similar to this one in ASP.Net: http://quickstarts.asp.net/QuickStartv20/aspnet/samples/ctrlref/standard/TextBox/TextBox1_vb.aspx I my RoR project I want to add a Greeter class like this one: class Greeter def initialize(name = "World") @name = name end def say_hi puts "Hi #{@name}!" end def
2006 Jul 20
5
RJS where to put helper method?
Hi, If I want to have helper method for my rjs, where''s the best place to put it? so for example: --- bla.rjs: page.replace_html ... page.visual_effect ... --- somewhere: (currently I put in application_helper.rb) def replace_with_effect(page) page.replace_html ... page.visual_effect ... end --- bla.rjs: replace_with_effect page and is there a way to define the helper so we
2007 May 10
13
Is there a way to do incremental search?
Say the user first enters "ruby" for search and gets 1000 results. Then he can search "rails" just in the 1000 results just returned. The common scenario is some kind of advanced search. User can incrementally add criteria and the program will narrow the results step by step. I know that at least I can use all the criteria as a whole to do the searching, but this is a waste
2007 Mar 13
0
aliasing, require_dependency and require
I''d really appreciate it if someone [with a decent understanding of the rails Dependencies mechanism] could help me explain the behaviour seen in this pastie. http://pastie.caboo.se/46630 The desired behaviour is simply aliasing a method in ApplicationController from a plugin while retaining automatic reloading in dev mode. The pastie is basically divided into 4 parts: - Setup of
2007 Nov 14
7
BackgrounDRb version 1.0RC1 available now
Hi Folks, BackgrounDRb is a Ruby job server and scheduler. Its main intent is to be used with Ruby on Rails applications for offloading long-running tasks. Since a Rails application blocks while serving a request it is best to move long-running tasks off into a background process that is divorced from http request/response cycle. This new release of BackgrounDRb is also modular and can be used
2006 Mar 30
25
TextMate for Rails development -- why?
Greetings, I am curious, I see quite a few references to using TextMate for rails development. I downloaded TextMate and used it for 30 days. I do not see what everyone is raving about. Snipplets are nice, but other editors do the same thing, some with much more power. Can anyone tell me what makes people draw to TextMate? Maybe I am missing the whole reason, I''d really like to
2008 Sep 03
4
delta index in Sphinx
Hello, all! Help me please to solve problem with Sphinx and its delta index. Configuration file is located in attachment to this topic. ------------------------------------------------------------------- mysql> select id, e_mail from users where e_mail LIKE ''%test%''; -------------------------------------------------------------------
2005 Nov 29
6
draggable revert problem
Hello, I have tried implementing the shopping cart ajax example and have run into some problems. The only differences with the shopping cart is My list of products are generated from a partial view The images of the products come from an http link. However, Iam seeing a strange behavior when I drag and drop the elements to my cart. On the first drag and drop the image successfully reverts to
2006 Mar 12
2
new version of RTWindows, a scriptaculous window system
Hey, I uploaded the (probably) final version of RTWindows. It is far from perfect, but it does enough for me. Main problem is slowness, but that seems to be a general problem of draggables. Take a look at http://www.uni-weimar.de/~scheffl2/amsterdam/rtwindows_0.5/rtwindows.php -- Posted via http://www.ruby-forum.com/.
2008 Sep 12
1
Referencing exactly two models of the same kind
Hi, how do I solve this in Rails: Lets say I have a User and a Message. Now, a Message is sent from one User to another User, which means that in the Message I have to reference a User twice! This seems to be a problem, if I do not user one-to-many or many-to- many relationships, because it seems to me as if I could reference a Model of the same type only once. However, I would like the Message
2005 Nov 03
3
Prototype is spamming my arrays!
Hi all, when I want to interate through an array, all those pesky Prototype functions get in my way! When I do this: --------------------- r=""; for(x in new Array()) { r+="var: "+x+", val: "+ (new Array())[x]+"\n"; } alert(r); --------------------- I get a giant alert window with loads of functions printed out. Is this a bug, or is there a better way to
2007 Apr 05
3
Trying to get drag and drop to revert when I want and stay at other times
Here''s the deal. I''m making an ajax-based chess game. It''s done but there''s something I''d like changed. Right now, to move pieces, you click on the piece you want and you click where you want the piece to go. People expect that, but they also expect the ability to simply drag and drop the piece. So I''ve been using the draggables and droppables,
2007 Aug 25
5
onLoad event with an update function
Hello, I am using the following code: new Ajax.Request(''ajax.php'', { parameters: { task: ''home'' }, onSuccess: function(transport) { $(''home_montage'').update(transport.responseText); new Effect.Appear(
2006 Nov 27
7
3 prototype/scriptaculous effects in order on one <div>
What I am trying to do is fade out the content in a certain <div> load new content while its black then fade in the new content but im lost. I need it to go like this... Effect.Fade,Ajax.Update,Effect.Appear but everytime I try to do it it just trys to do all of them at once, how do I go about making the effects wait on the previous one before it starts?