Displaying 20 results from an estimated 20 matches for "do_it".
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? Obviously the :thetextval
=> :mytextfield.value does not work. I checked the :params on the do_it
controller but :mytextfield is not in there. However,...
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 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 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb
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
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 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
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 refid http://test.host/login
/usr/local/ruby/lib/ruby/1.8/soap/baseData.rb:166:in `decode''
/usr/local/ruby/lib/ruby...
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]">
....
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
2006 Sep 07
1
test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
...= 0, cue_specification = {has_start_point = -1207954168, has_end_point = 0, start_track = 3086395392, start_index = 40, end_track = 3086395392, end_index = 3086396416}}}) at decode.c:203
#3 0x0805a507 in decode_file (infilename=0x8341978 "metaflac.flac") at main.c:1730
#4 0x0805c241 in do_it () at main.c:486
#5 0x0805ca7b in main (argc=4, argv=0xbffffa34) at main.c:284
And output of adding -x:
options: -P 4096 -b 1152 -l 0 -q 0 -r 2,2 -V
sh: Verify OK, wrote 554232 bytes, ratio=0.967
+ chmod +w metaflac.flac
+ check_flac
+ run_flac --silent --test metaflac.flac
+ '['...
2006 Jun 04
0
Re: flac with >4GB raw still does not work (CVS)
...im_subframes = 0}}, is_big_endian = 0,
is_unsigned_samples = 0, channels = 2, bps = 16, sample_rate = 44100})
at encode.c:1060
#2 0x0805d53a in encode_file (infilename=0x833d3e0
"/mnt/sda/Sound/Recording/2006-06-02/a.raw", is_first_file=1,
is_last_file=1) at main.c:1699
#3 0x08059493 in do_it () at main.c:519
#4 0x08058943 in main (argc=11, argv=0xbfd85bd4) at main.c:297
--
avuton
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
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
2008 Nov 03
1
concerned_with, and maybe require_dependency issues only when running specs?
...ttp://paulbarry.com/articles/2008/08/30/concerned-with-skinny-controller-skinny-model
Basically allowing me to have:
/app/models/user.rb
class User < ActiveRecord::Base
concerned_with :something
end
/app/models/user/something.rb
class User < ActiveRecord::Base
def something_method
do_it
end
end
I realize that there might be better ways to deal with this same
issue...some of my code might be better off in separate classes, or modules,
etc, but for now I''m hoping to try this out. And it''s working working great
in my code, when I run the server, script/console, e...
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
2014 Nov 26
0
[PATCH] Some last copyright year updates and change to open bug list
.../valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" hspace="0" /></a>
diff --git a/src/flac/main.c b/src/flac/main.c
index d7f11dc..3cddc70 100644
--- a/src/flac/main.c
+++ b/src/flac/main.c
@@ -479,7 +479,7 @@ int do_it(void)
}
flac__utils_printf(stderr, 2, "\n");
- flac__utils_printf(stderr, 2, "flac %s, Copyright (C) 2000-2009, 2011-2013 Josh Coalson & Xiph.Org Foundation\n", FLAC__VERSION_STRING);
+ flac__utils_printf(stderr, 2, "flac %s, Copyright (C) 2000-2009, 2011-2014 J...
2006 Aug 28
2
test_metaflac fails in make check for flac 1.1.2 after --add-padding is performed
doing "make check" on flac-1.1.2, I get a segmentation fault
././test_metaflac.sh: line 51: 17370 Segmentation fault flac $*
when running this portion of the test/test_metaflac.sh script:
(set -x && run_metaflac --preserve-modtime --add-padding=12345 $flacfile)
check_exit
check_flac <---------------- where the segfault happens
All other tests in
2007 Oct 09
23
Testing layouts with RSpec on Rails
Hey guys,
Does anyone have any wisdom to share on the subject of speccing Rails
layouts?
Most of it''s plain old view specs stuff, but are there sensible ways
to verify things like the yield call? (Mocking doesn''t catch that)
Thanks,
Matt
--
Matt Patterson | Design & Code
<matt at reprocessed org> | http://www.reprocessed.org/
2005 Feb 01
4
Shorewall problem
I am getting the following message when Shorewall stops can anybody shed
any light on this message and where I should be looking? Thanks
root@bobshost:~# shorewall stop
Loading /usr/share/shorewall/functions...
Processing /etc/shorewall/params ...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Stopping Shorewall...Processing /etc/shorewall/stop ...
IP Forwarding Enabled