similar to: Using ActiveSupport::JSON in PrototypeHelper, ScriptaculousHelper

Displaying 20 results from an estimated 800 matches similar to: "Using ActiveSupport::JSON in PrototypeHelper, ScriptaculousHelper"

2010 May 24
2
Two RJS visual effects will happen at the same time?
I was going to change the background of a div from white to red and then from red back to white, so this is used in an RJS file: page[:vote_score].visual_effect :highlight, :startcolor => ''#ffffff'', :endcolor => ''#ffcccc'' page[:vote_score].visual_effect :highlight, :startcolor => ''#ffcccc'', :endcolor =>
2006 Nov 04
0
testing actionpack (for patch)
Hello, I''ve read the file on running tests for actionpack (I''m working on a patch), but I''m getting this error... ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:240:in `load_missing_constant'': uninitialized constant ActionView::Helpers::JavaScriptHelper::PrototypeHelper (NameError) I''ve tried... rake
2007 Jun 04
2
Re: Ajax.Request question with JSON return
Do I need something like this: eval(''('' + this.header(''X-JSON'') + '')'') (taken from Cody Swann, http://ajaxian.com/archives/prototype-extension-dynamic-script-pattern-support ). I''m guessing my problem is simpler, and I''m leaving something small out related to the header though. Thanks for any help -Mark 1. evalJSON:
2007 Nov 15
3
modern-CentOS-1.7-2
Hi, the layout on wiki-m.centos.org looks pretty convincing to me, now. Two things: <http://people.centos.org/~ralph/pagetrail.png> - the pagetrail stuff isn't readable at all. I propose the following patch to screen.css: -----%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----%< --- screen.css.orig 2007-11-15 12:35:59.000000000 +0000
2007 Oct 02
0
More JSON and XML feature parity for AR and ActiveSupport (patch review)
I''m really glad the JSON changes got in, many thanks to all involved, committers and contributors alike :). But there''s still one feature that''s missing to achieve feature parity between the JSON and XML encoding/conversion. And that is the abililty to say in your controller: @authors = Author.find(:all) render :json => @authors.to_json(:only => :name)
2009 Dec 08
0
ActiveSupport 2.3.5 and json 1.2.0 gem
Hey, I''ve tried every trick I can find, yet I''m still unable to get the json gem and ActiveSupport to play nice. No matter in which order I load json and active support, I still end up with: NoMethodError: undefined method `[]'' for #<JSON::Ext::Generator::State:0x104b7fac0> I''m trying to use the JSON object directly, *not* as a ActiveSupport backend:
2006 Jul 03
0
Page 129 of Agile Web Dev on Rails (or pg141 of pdf!)
Hi - another question, sorry.... I''m trying to get the highlighting effect to work on the current_item. The page refreshes fine, and then I get an error as the highlighting code is fired: page[:current_item].visual_effect :highlight, :startcolor => "#88ff88", :endcolor => "#114411" The error
2018 Sep 14
1
Possible bug with chromatic adaptation in grDevices::convertColor
It appears that the chromatic adaptation feature of `grDevices::convertColor`is broken, and likely has been for many years.? While a little surprising, it is an obscure enough feature that there is some possibility this is actually broken, as opposed to user error on my part.? If it turns out to the latter, I apologize in advance for spamming this list. Consider: ??? rgb.in <-
2007 Dec 07
2
[ActiveSupport] Patches needing review: re-organization of #to_query methods, preservation of XML/JSON content-type
Just a quick pointer to some ActiveSupport patches hoping for reviews: Puts Array#to_query and Object#to_query in the right places in ActiveSupport - http://dev.rubyonrails.org/ticket/10395 Preserve user-specified content type for XML and JSON rendering (currently it''s overridden and set to Mime::XML/Mimi::JSON - http://dev.rubyonrails.org/ticket/10388 Oh and a tiny patch for
2006 May 27
5
ActiveSupport JSON working?
Hi, I am trying to convert a hash to JSON using ActiveSupports built in .to_json. I am doing similar to the example below but are there certain strings that could go in place of ''bar'' or ''rez'' that will break the to_json method? I am using a very long string from rjs output in place of ''bar''. Perhaps .to_json is not ready yet? Thanks, Peter
2012 Oct 14
3
Pivot Table "like" structure
HI Team, I am currently working on problem and stumped on "for" loop. Data: structure(list(Coutry = structure(c(3L, 3L, 3L, 3L, 2L, 2L, 1L, 1L), .Label = c("J", "M", "U"), class = "factor"), State = structure(c(1L, 1L, 4L, 2L, 5L, 5L, 3L, 6L), .Label = c("A", "C", "K", "O", "S",
2006 Jan 17
0
:afterFinish not getting called?
I am attempting to remove an element in the :afterFinish callback of the "Squish" effect. This is what my call looks like. <%= link_to_remote ("X", :url => { :action => "deleteIt", :id => wc_line.attributes[''id''], :exercise_id => wc_line.attributes[''exercise_id''] },
2006 Jul 26
1
how do I change color to an highlight effect ?
This is my code: <%= form_remote_tag :url => { :action => "forgot_account" }, :update => "result", :complete => visual_effect(:highlight, "result", :duration => 2, :startcolor => "#c8e673", :endcolor => "#9db55d") %> If I remove colors to the effect everything works, but with this code it renders on another
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the examples in the second edition Agile book. I have everything working except for the RJS that removes items from the cart. Ideally what I''d like to do is highlight an element that I am deleting only if there is more than one of that particular item in the cart. If the item deleted is the only of
2006 Jul 23
1
some question about ''observer_field''
Is the observe_field (ActionView::Helpers::PrototypeHelper ) can be apply to any html tag? (such as div) I tried to apply ''observe_field'' to observe the content of <div> tag, but, as the observed <div>''s content was changed, there was nothing happend. for example (in test.rhtml): <%= link_to_remote "test", :update=>"content1",
2009 Mar 01
1
sortable_element helper query
Is it possible to call helper method instead of controller action while using sortable_element helper method? Ref: http://api.rubyonrails.org/classes/ActionView/Helpers/ScriptaculousHelper.html The url field in the example is like controller/action type. Can we call ControllerHelper method instead? Because we need to save the sorted element in the database, so my guess was to call a method in a
2006 Mar 27
7
rjs template ? (how to check for existence of a dom element?
In my rjs template I''m using the following line. page.visual_effect :slideUp, ''comment_error_details'', :duration => 0.5 It works fine if I have created the div with the id="comment_error_details", but if I haven''t created the error yet then my whole rjs template fails. How can I check to see if an element has been created? I could then put
2006 Apr 28
3
AJAX effects not smooth on Rails
I''ve been playing around with AJAX effects using ActionView::Helpers::ScriptaculousHelper. When I implement these ''freehand'' on a regular html page the Scriptaculous effects are smooth. However when I use them rails methods they are not. For example Appear, Grow and Slideup all blink the text at the start. As in the content appears for a split second, then
2006 Oct 09
2
page.visual_effect :highlight
I have some code that will do the highlight, fade effect on a block of text. It seems to work just fine until it is fired multiple times very rapidly. The end color matches a grey background and the start color is a yellow. Say its run 4 times a second for 3-5 seconds. When the flashing catches up the text will fade for the last time to the end color, then the background will switch to a
2006 Jun 12
0
Passing parameters to ''remote_function''
Hi, I am trying to use the ''remote_function'' helper method from the PrototypeHelper class on a the onblur event of a text_field for filling a form with data via AJAX. How can I get the value of the text_field for making a query to the database in the controller action? <%= text_field("item", "code" , :onblur => remote_function(:update =>