similar to: sort_link_helper and cross-controller partials

Displaying 20 results from an estimated 300 matches similar to: "sort_link_helper and cross-controller partials"

2006 Jul 11
1
Can one controller use another''s Helper Methods?
If I have controller1 and controller2, how would controller1 call method Arf in controller2''s helpers? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2008 Mar 09
1
Two sample t-test
Hi, I want to perform t-test in R for each individual car. Here is what i have. Is there a way i can test each car? The original table (test.csv) Car Tester2 Tester2 Controller1 Controller2 Audi 0.56 0.9 0.5 0.9 Toyota 0.2 0.9 0.9 0.2 Honda 0.5 0.9 0.1 0.5 BMW 0.2 0.3 0.5 0.7 > cars<-read.table("c://test.csv",header=T,sep=",", + skip=2,comment.char="")
2006 Nov 04
0
sharing a partial across multiple controller views.
Hello, I was wondering if there was a way to share a partial across multiple controller views? In other words, if I have 2 controllers, the corresponding directory structure for the views of those conrollers would like so: views/controller1/<views> views/controller2/<views> I would like to share the partial between controller1 and controller2. Could I make a share directory under
2007 Mar 30
2
Replacing slot of S4 class in method of S4 class?
Dear all, Assume that I have an S4 class "MyClass" with a slot "myname", which is initialized to: myname="" in method("initialize"): myclass <- new("MyClass", myname="") Assume that class "MyClass" has a method "mymethod": "mymethod.MyClass" <- function(object, myname=character(0), ...) {
2012 Aug 03
1
Interaction between callNextMethod() and selectMethod()
Hi, Strange things happen. Here is a simple example: > setClass("A", contains="integer") > setMethod("as.matrix", "A", function(x, ...) t(callNextMethod())) Creating a generic function for ?as.matrix? from package ?base? in the global environment [1] "as.matrix" > a <- new("A", 1:3) > as.matrix(a)
2000 Feb 28
1
Failed RPC Call
I am totally at a loss. I use domain authentication off an NT Server 4.0 computer with service pack 5. I use Samba 2.0.6 running Mandrake 7.0 on my fileserver. I've tried both the "stock" version of samba that came with Mandrake and also a fresh build from the tarball off samba.org's mirror site. Here is the problem: I have a series of services established, all of which
2002 Nov 05
1
function showMethods and inheritance
Hi, The following question might come from my (deep) misunderstanding of the concepts in the package 'methods'. I have a class 'A', and a class 'B' inheriting 'A' (so defined with 'setClass' and the parameter 'contains="A"'. The class A has a method 'mymethod'. A call to 'showMethods("mymethod")' return the
2017 Sep 22
2
S4 method implementation for S3 class
Hi all, I'm trying to implement the matrix multiplication operator, which is S4 generic, for an old-style S3 class. The following works as expected: x <- 1:10 class(x) <- "myClass" setOldClass("myClass") setGeneric("myMethod", function(x, y) standardGeneric("myMethod")) setMethod("myMethod", c("myClass", "myClass"),
2010 Oct 14
7
undefined method?
I''m trying to learn rails as I go along, and having a bit of trouble. There is an undefined method cropping that I don''t know why rails thinks should be there. Firstly, I''m using rails 3, ruby 1.9.2 I have a controller with an index action This part works fine, but i am trying to add a comment form to the page that is rendered by that index action. Supposing my
2016 Nov 24
3
llvm optimizer turning musttail into tail
I've got some calls like: musttail call void bitcast (i32 (i32, i8*, %Type*)* @MyMethod to void (i32, i8*)*)(i32 %0, i8* %1) ret void Into something like: %8 = tail call i32 @MyMethod(i32 %0, i8* %1, %Type* null) ret void I realize I'm losing a parameter there, but this is an interface jump trick I use and relies on the end code being a 'jmp' (x86). I realize i can probably
2010 Dec 22
1
forcing evaluation of a char string argument
I'm trying to make a function to turn a regular function into an S3 generic one. I want myMethod to be: function(x,...) UseMethod("myMethod") But I keep getting: function(x,...) UseMethod(func) Here's the function: toGeneric<-function(func) { env<-environment(get(func)) # default method of new generic = the original function
2006 Aug 10
1
Passing parameters defined in a function or something
Hi, I have method I want to call ... it can receive * number of parameters. I also have 3 parms that I want to pass often, so I have defined them in a separate function: def my_params { :parm1 => 1, :parm2 => 2, :parm3 => 3 } end And I want to call my method like this: mymethod :parm4 => 4, my_params Now - this doesn''t work - as my_params is a hash of params, which
2016 Nov 27
3
llvm optimizer turning musttail into tail
r287955 seems like it might be related. -- Sean Silva On Sat, Nov 26, 2016 at 4:06 PM, Sean Silva <chisophugis at gmail.com> wrote: > This sounds buggy to me. What pass is doing this? > > -- Sean Silva > > On Thu, Nov 24, 2016 at 5:39 AM, Carlo Kok via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> >> I've got some calls like: >>
2006 May 30
0
2 quick question about SaltedLoginGenerator
Hi all, I''m using the Salted Login Generator. It''s fantastic. And I have tow quick questions, wish you could give me a hint. 1. I have a few controllers, which all got "index" action. And how can I make login system pass Controller1::index, but restrict access to Controller2::index 2. When the user click the link to verify himself, I want to fill some my customised
2010 Apr 26
2
woriking under webrick but not under passenger
Hi! I have just added login feature to my rails application (followed the instruction from (Agile Web Development with Rails) but now I am getting strange errors (looks to me like some kind of routing problem) under the passenger/apache. The error is: 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. From the log:
2005 Dec 29
2
Access rails logger from plain class
How can I "get" the rails logger from a plain class, that is a class that does not inherit from a rails class? I have tried using RAILS_DEFAULT_LOGGER (see below) but it''s nil class MyClass logger = RAILS_DEFAULT_LOGGER def myMethod logger.debug("stuff...") end end -- Posted via http://www.ruby-forum.com/.
2006 May 01
4
When to make a new controller
Hey all, Ok this is probably a newb question, but I haven''t been programming with MVC for very long, and I''ve been wondering what the general opinion is, or best practices, for making a new controller. Like what cases would you need a new controller for and what cases can you just put everything into one controller? Thanks in advance, Randal -- Posted via
2004 Dec 13
4
Dispatcher? how to use long urls with slashes to call a controller
Hello rails, I have a controller called file with a method get that returns me a file from the db. want to do the following: When calling http://localhost:8080/file/get/11/hansi.txt i want that rails does the same as if i would call http://localhost:8080/file/get/11 This i not the case. I get a 404. This is useful as this makes the filename in the browser downloading the
2006 Aug 16
0
sort_link_helper , sorting on date
I am using this helper to sort my table colums, no problem sorting on string but how can I sort a date colum ( in my DB, ) user_helper.rb ---------------------- def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param options = { :url => {:action => ''list'', :params => @params.merge({:sort => key, :page =>
2007 Mar 22
2
Inconsistent Invalid Argument Error
I have a view with a table that contains sortable links as headings. Here is the code used to create these sortable links in the application_helper: module ApplicationHelper def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param link_to(text, :controller => ''sales_orders'', :action => ''list'',