similar to: newbie - best place to put methods used in controllers?

Displaying 20 results from an estimated 10000 matches similar to: "newbie - best place to put methods used in controllers?"

2010 Nov 26
1
How to use expression(italic()) in a "vectorized" way (within a function)?
Dear expeRts, I would like to use expression() for creating labels in a splom, as shown in the first minimal example below. Is there any way I can simplify having to write "expression(italic(...))" several times? The second example is what I tried so far, but I can't manage to get italic() to work. Moreover, it still seems bulky... Cheers, Marius ## minimal example (working but
2006 Aug 02
3
newbie question, adding conditions to collection of sql objs
I have: @pictures=@c.pictures How do I add limit and order_by conditions. I have tried the following: @c.pictures.find_all(:limit=>5) @c.pictures, :limit=>5 @c.pictures :limit=>5 None of these work. -- Posted via http://www.ruby-forum.com/.
2006 Aug 02
3
controller methods for app/views/A/B.rhtml
If I want to call A/B, can I call a corresponding controller action for it? Like with app/views/A.rhtml, I can it will call the method A in the controller file. But with A/B.rhtml, I cant do def A/B. -- Posted via http://www.ruby-forum.com/.
2001 Jul 22
1
Length of song calculation
Hello Developers I'm writing a playlist creator app for radio stations (in Delphi) which supports WAV & MP3 files & I would like to add OGG support. All I need is the ability to read the length of the track from the file header. The documentation on the website is beyond me. I would rather not include a bulky library that does everything else. Does anyone have any Delphi code or
2006 Oct 13
5
multi_search error undefined method
Hi, Im having problems using the multi_search command. I keep getting the following error. "undefined method `<<'' for Book:Class" here is the code associated with this. class Book < ActiveRecord::Base acts_as_ferret :store_class_name => true end class User < ActiveRecord::Base acts_as_ferret :store_class_name => true end and the call is the
2015 Feb 22
2
Upgrading Xen 3 on SL 5 server with CentOS 5 and SL 5
On Fri, Feb 20, 2015 at 10:07:54AM -0500, Nico Kadel-Garcia wrote: > Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now. > > Also, has Xen console access gotten any better for fully virtualized guests? I've just been forcibly reminded how awkward it was to access the Linux installation screens to manipulate
2015 Mar 09
2
Upgrading Xen 3 on SL 5 server with CentOS 5 and SL 5
On Mon, Feb 23, 2015 at 9:49 PM, Nico Kadel-Garcia <nkadel at gmail.com> wrote: > On Sun, Feb 22, 2015 at 4:41 PM, Pasi K?rkk?inen <pasik at iki.fi> wrote: >> On Fri, Feb 20, 2015 at 10:07:54AM -0500, Nico Kadel-Garcia wrote: >>> Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now.
2013 Apr 01
0
[LLVMdev] some questions about the best place to put some passes
I have two sets of features I want to add to the mips16 port. 1) A module pass that scans the IR and makes a decision as to whether to compile the given function as mips16 or mips32. Now I can specify this by adding attributes. Mips16 is just used for space optimization so the presumption is that I'm only worrying about space optimization for this pass. At a first approximation, this
2010 May 30
4
Changing R_LIB_USER variable in ubuntu...
Hi, I'm an experienced R user on windows, but new to linux. This may be an issue with how R (or Ubuntu) was install on my computer, but maybe not. I just installed Ubuntu 10.04, I have administrator privileges and am using R 2.11. Here goes: I'd like to change the location where R installs packages not included in the base installation (using install.packages()). Right now it is
2006 Jan 16
1
multiple config files
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 is there a way for isolinux to have multiple config files for the same isolinux.bin (in grub it's configfile (cd)/boot/grub/other.lst and in cdshell it's script file.scn) to have recursive f1-f10 ability and make the isolinux.cfg less bulky -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Created with GnuPG
2010 Sep 21
1
Doing operations by grouping variable
I'm writing an expression that requires searching a vector according to group. As an example, I want to find the maximum value in each of 5 groups. group=rep(1:5, each=5) # create grouping variable variable=rnorm(25) # generate data d <- data.frame(group,variable) # make data frame
2018 Mar 31
4
Writing tests with Filecheck without emitting output to stdin
Hello I have pass operating on bitcode file which produces more than one equivalent representation. opt --my-pass <%s | Filecheck %s --my-pass generates files a.rpt b.rpt c.rpt . How do i write test without writing all 3 files to stdin. I have considered CHECK-LABEL for each. it creates bulky checks. Thanks Mahesh -------------- next part -------------- An HTML attachment was
2006 Jul 26
5
RoR data models ( extreme newbie question)
Sorry for asking this but I am keen to get on and build an app based on RoR and have had a look around at FAQa and the like with no immediate sucess. What I am looking for is an explainantion of the rules/requirements for table/index/coulumn names with RoR. RoR appears to have a set of expected naming conventions which it would appear you can over ride but it would seems a hell of a lot
2006 Jul 26
4
Which is the best place to put business logic ?
Hello, I wonder if it''s better to put business logic in the controller or in the model (I presume model is better) Eg. client controller, disable_account action client = Client.find(params[:id]) client.send_pending_invoices() client.login_enabled = false client.receive_newsletter = false or client = Client.find(params[:id]) client.disable_account() # and put the whole stuff in this
2010 Aug 29
3
Saving plot to tiff, with high resolution for publication ?
Hello all. A Journal we are sending an article to is asking for the following: To ensure the best reproduction quality of your figures we would appreciate high resolution files. All figures should preferably be in TIFF or EPS format... and should have the following resolution: Graph: 800 - 1200 DPI Photo: 400 - 800 DPI Color (only CMYK): 300 - 400 DPI (DPI = dots per inch) Since I am sending
2005 Aug 05
1
OT: cheap DVD-RAM media?
A bit off-topic. Not a question on how to get it working, but rather question about an practical issue after you get it to work ;-) I got a DVD burner that supports DVD-RAM (in addition to standard DVD+R/-R). I really liked "use it just like hard disk" properties of DVD-RAM, and according to some sources I found, the media itself is more resistant to ageing than standard DVD+R/-R.
2018 Apr 01
0
Writing tests with Filecheck without emitting output to stdin
See: http://llvm.org/docs/CommandGuide/FileCheck.html It is not required to pipe output to FileCheck; there is the --input-file option, which allows you to run FileCheck on an existing disk file. Something like this: FileCheck %s --input-file a.rpt --check-prefix=A FileCheck %s --input-file b.rpt --check-prefix=B FileCheck %s --input-file c.rpt --check-prefix=C If there are common parts to each
2007 Mar 29
1
Extending the to_s method
Hi! I''m developing an localization plugin (just for my own purposes) and I wanted to extend the to_s method for the Time class. What I want to do: when someone does date.to_s(:short) that a localized version of the :short date is displayed. But I don''t know how to accomplish this. I know have this: class Time def to_s(option) print option.to_yaml
2003 Oct 08
1
Mini-PC box to run server
On the cheap side, the ITX or even MicroATX machines work great. These are commodity items, so they tend to be far less expensive than custom solutions. Various manufacturers, but we've had very good success with any of the AOpen MicroATX boards and their slimline MicroATX case: Aluminum: http://usa.aopen.com/products/housing/A340-series.htm Steel:
2018 Jul 10
6
[RISCV][PIC] Lowering pseudo instructions in MCCodeEmitter vs AsmPrinter
H all, I'm looking at generating PIC code for RISC-V in the context of Linux. Not sure if anyone is working on this already, any inputs are very welcome. I'm now looking at function calls which in the RISCV backend are represented via two pseudoinstructions RISCV::TAIL and RISCV::CALL. Currently those pseudos are lowered in MCCodeEmitter. They are expanded into AUIPC and JALR