similar to: [PATCH] helper to create fb css stylized table

Displaying 20 results from an estimated 400 matches similar to: "[PATCH] helper to create fb css stylized table"

2008 Mar 18
4
respond_to formats, fbml and fbjs
In my controllers I have a respond_to block for both fbml and fbjs. I created the fbjs mime type in environment.rb: Mime::Type.register "application/javascript", :fbjs However, even if I specify fbjs in a parameter name format during AJAX post requests, it is being overwritten by Rails or Facebooker as FBML. I confirmed this by placing logger.debug params[:format] immediately before
2008 Mar 30
0
javascript confirm function in FBJS
I''d like to add the :confirm option in the link_to_remote and replace the missing confirm function with Facebook''s Dialogs. function confirm(text) { dlg = new Dialog(Dialog.DIALOG_CONTEXTUAL).showChoice(''Confirm Request'', text , ''Yes'', ''No''); dlg.onconfirm = function() { return true; }; dlg.oncancel = function() { return
2006 Jun 08
3
Macros and stuff
I was looking at my controller code and the edit/create/update/new for each are practically identical. So first I DRY''d the four methods in each controller to just one and then I decided to write a single macro for all my controllers. This is the macro: def self.edit_action_for(model, options = {}) model_class = Object.const_get(model) define_method(:edit) do
2006 May 19
1
pass text_field to controller when using periodically_call_r
Hi. Can anyone help with this? In a view, I have a text_field_tag( :mytextfield ). I would like to pass the current value of that text_field_tag to a periodically_call_remote - something like periodically_call_remote( :url => { :action => :do_it, :thetextval => :mytextfield.value } ) - Any idea how can I pass and/or access the value of the text_field_tag in my do_it controller?
2005 Apr 23
7
Validation question
Hi all, Is there a way to invoke validations at times other than save, create and update? I know that I can do this by writing my own validation checks using errors.add_[blah], but I''d like to leverage the existing validation code. What I have is two sets of fields in a record, set A and set B. Both sets must be validated on record create. However, the trouble is that after
2008 Jan 25
5
ajax with facebooker?
So if I am using fbml,canvas & facebooker, can I do ajax calls? if so how? From reading it seems they support some sort of mock ajax, but I don''t really understand, can somone explain to me? If I cant do ajax, can I still do javascript? Can I use 3rd party libs like prototype & scriptaculous? thanks Joel
2007 Oct 25
3
Setting session values
Okay, I give up. I have been trying to set session values in a controller, but no matter what, once the request is made and inside the controller, the session is empty. What''s the correct way? I have tried session[''whatever''] = something controller.stub!(:session).and_return(session) I tried creating a new session, but nothing seems to do it. I''m sure
2006 Jun 28
1
Where is this documented?
If I create a controller, and put only one line in it def do_it render :text => "Hello" end in it, then rails doesn''t display the view do_it.rhtml. I''m looking for the general rule behind this behavior (including any details that I may not be aware of). Where is such behavior documented?
2008 Mar 12
2
Developing Facebook Platform Applications with Rails
I was hoping to announce this a month ago, but some legal wrangling took longer than expected. Developing Facebook Platform Applications with Rails is now available in Beta at http://www.pragprog.com/titles/mmfacer It walks you through creating a Facebook application with Facebooker, all the way from setup to handling large number of users. Thank all of you for asking questions on this
2008 Apr 07
7
Testing and Mocking
Can I second this question? Could someone provide a simple example of how they set up a functional test for a controller that uses facebooker?? Do you have to copy a lot of stuff from rails_integration_test.rb ? I guess that since we don''t have a test facebook to test against, we have to stub out a lot of stuff right? --simon > Hi, I''m wondering if folks would care
2006 May 09
3
validations erasing the form
Hi there I have a for with a couple of text_fields. I''m doing some validation via the model and when the validation "works" I get there was an error on blah blah the problem is the form is erased and I have to fill up the form again! I saw that scaffold keeps the form filled when the validation "works" but I dont know exactly what''s making it happen! I would
2004 Feb 10
22
Re: [Shorewall-newbies] specific log-prefix ... patch
Let''s move this to the Shorewall Development list.... On Tuesday 10 February 2004 03:14 pm, xavier wrote: > here is a patch to allow this : > |ACCEPT<10/sec:20>:debug fw lan:$ntp_servers udp 123 - - - - ntp > > a problem with the patch is that now the logprefix is mandatory. > i''m trying to debug it, but i can''t find the flaw. Also, with
2005 Dec 14
5
inserting multiple rows
I have table which stores multiple entries. Each row has user_id, game_id and a pick_id. On a page the user has to make load of choices. All this gets submitted. the html looks like so: <input type="hidden" name="game_id" value="3"> <input type="hidden" name="user_id" value="19"> <select name="pick[3]"> ....
2008 Aug 20
1
Facebook javascript (FBJS) library
I wrote an fbjs library to help speed up development of some of my applications. I plan to have some sort of "official" release with a blog entry and github repository at some point, but I thought you guys might want to have it earlier. It''s still a work in progress. I''ve been using every method at least once in my application but it''s still possible there is
2005 Aug 15
3
How to repeat code snippet for several variables in a data frame?
Dear all, I have a data frame containing the results of an experiment. Like this: a<-seq(1,4,by=1) b<-seq(1,2,by=1) test<-expand.grid(b,a,a) colnames(test)<-c("replicates","bins", "groups") test$abc <- rnorm(32) test$def <- rnorm(32) test$ghi <- rnorm(32) test The following code snippet aggregates the data for one variable and then draws a
2005 Dec 31
1
Error when Testing AWS API (ArgumentError: illegal refid http://test.host/login)
OK, I''m finally starting to play around with the AWS part of Rails, and I''m running into problems with the functional tests. If I use the generator to create the web service as ./script/generate web_sevice MyTest do_it and then run the unit tests without further editing the code, I get the following error: test_do_it(MyTestControllerApiTest): ArgumentError: illegal
2007 Dec 20
0
Relative URL fix
Hi Facebookers, I have been working on a change to facebooker to allow facebook and non-facebook apps to exist on the same code-base. I modified the url rewriting in facebooker a bit so that it would continue to use the facebook relative url when needed but not prepend the facebook app name to controller paths that didn''t have anything to do with your facebook app. Here is the
2006 Jul 20
1
external updates to database
Hi, I have the following situation: I have developed something using ROR. The data that is being displayed by the view needs to be refreshed periodically - The data pertains to the state of machines in a cluster. I dont want to query the state in my model, because it may take a long time to do that. I want to have a thread running (in the background) which is constantly checking the status
2006 Jun 03
2
flac with >4GB raw still does not work (CVS)
I'm attempting to flac a 18GB raw file, and as per 1328191 I compiled CVS, when it gets to 4GB it doesn't continue. I've tried stracing and get no output after a certain point. I also have tried oggflac and it is no different. I configured with no options or special CFLAGS and this is on a x86 machine. Is there anything special I need to do to get this to work? I have also tried with
2006 Sep 07
1
test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
Josh, I applied this patch and all the "make check" tests passed (but I do not have valgrind and I did not use --enable-exhaustive-tests during configure, so it isn't all the tests). Do you see anything suspicious about it? --- flac-1.1.2.oldBuild/src/flac/decode.c 2005-01-24 20:13:46.000000000 -0800 +++ flac-1.1.2/src/flac/decode.c 2006-09-06 23:36:26.000000000 -0700