Displaying 20 results from an estimated 200 matches similar to: "Access from common class"
2006 Mar 22
9
render partial from withit mail template
Hi,
I''m trying to include a partial in an email template but it throws me this:
undefined method `controller_path'' for SupportMailer:Class
Extracted source (around line #12):
11:
12: <%= render :partial => ''footer'' %>
I guess email views are a little different from normal ones as they
don''t seem to have a access to a proper controller (?)
2013 Oct 30
3
Use of FCKEDITOR as normal text area
Hi all
I am trying to use Fckeditor as text area to send mails.here is my code
<% remote_form_for :send_sms,
:before => "Element.show(''loader'')",
:success => "Element.hide(''loader'')" do |sms| %>
<div id="news_content_text_field_bg">
<%= fckeditor_textarea :send_sms, :message,:lang =>
2008 May 28
3
Mocking objects to test Rails Controllers
Hi all,
I''m currently considering the use of Mocha to aid in writing my Rails
unit/functional tests.
I currently have a Rails model which mixes in a series of methods to
allow it to talk to an external service. The code is roughly of this form:
class Person < ActiveRecord::Base
include SMSNotifier
def send_notification(message)
send_sms(number,message)
#
2005 Nov 17
7
render :partial in mail template
Hi,
Is it possible to render a partial template from within a mail template?
I get the following error
undefined method `controller_path'' for SupportMailer:Class
Extracted source (around line #8):
5:
6: <%= @url %>
7:
8: <%= render_partial ''sig_admin'' %>
Jeroen
2009 Nov 09
1
SendText
Does anyone have any success with sending a text message from
extensions.conf
to an PSTN endpoint such as a cell phone?
If so, kindly send configuration for this part. I am working on an IVR and
want
callers to get a text message at a particular part of the call, after
dialing a defined character (such as 22).
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2013 Mar 01
1
.Call interface: Use R SEXP as C mutable *char
Dear R Developers,
DISCLAIMER: I am new to package development in R and new to this list.
I am trying to do something along the lines of:
SEXP test_fun (SEXP filename) {
const char *inputfile = translateChar(STRING_ELT(filename, 0));
int abc = some_function(inputfile);
...
}
The code compiles fine, but I get a warning:
"passing argument of 'some_function' discards qualifiers
2009 Nov 01
5
Headache with sessions being shared.
I have a really horrendous problem with sessions.
before_filter :find_cart_from_session
private
def find_cart_from_session
if session[:cart] # if there''s is a cart in the session
begin
@cart = Cart.find(session[:cart]) # return existing or new cart
rescue ActiveRecord::RecordNotFound
@cart = Cart.create
@cart.save
session[:cart] = @cart.id
2010 Oct 01
3
scoping goes wrong when some functions are used within others.
Dear,
I'm following the r tag on stackoverflow.com, and couldn't but notice
there are quite some questions popping up that deal with scoping in
relation to custom functions. I grinded my teeth on it already, and I
have absolutely no clue what goes wrong. The general pattern is as
follows :
ff <- function(x){
y <- some_value
some_function(y)
}
> ff(x)
Error in eval(expr,
2016 Sep 12
2
Counterintuitive use of LLVMBool in C-API?
Hi,
I stumbled across the following:
> /* Builds a module from the bitcode in the specified memory buffer,
> returning a
> reference to the module via the OutModule parameter. Returns 0 on success.
> */
> LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf,
> LLVMModuleRef *OutModule);
However in most scenarios i know, a Bool is something like
0 = False
!0 = True
In short:
2015 Nov 16
2
Best way to implement optional functions?
On 16/11/2015 4:00 AM, Richard Cotton wrote:
> On 22 October 2015 at 22:55, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>> I'm planning on adding some new WebGL functionality to the rgl package, but
>> it will pull in a very large number of dependencies. Since many people won't
>> need it, I'd like to make the new parts optional.
>
>> Can
2008 Sep 30
12
dtrace missing ''unlinkat''? showing process stack?
everyone,
Just out of curiosity, I did a
dtrace -n ''syscall:::entry { @num[execname, probefunc] = count(); }''
and looked at the entries produced by ''rm''.
I see everything that rm did, *except* the unlinkat - which is unfortunate because I want to trace which processes have deleted which files.
So - does dtrace contain unlinkat as a probe for a system call?
2012 Jan 25
3
[LLVMdev] [RFC] Module Flags Metadata
Chandler Carruth wrote:
> On Tue, Jan 24, 2012 at 12:02 PM, Bill Wendling <wendling at apple.com
> <mailto:wendling at apple.com>> wrote:
>
> On Jan 24, 2012, at 1:35 AM, Chandler Carruth wrote:
>
> > On Wed, Jan 18, 2012 at 1:36 PM, Bill Wendling
> <wendling at apple.com <mailto:wendling at apple.com>> wrote:
> > Hello,
>
2005 Nov 25
2
Wx::SystemSettings mark II
hi
patches and files for Wx::SystemSettings, with get_font included in swig
file and a sample that doesn''t segfault wxruby.
CVS patches: RubyConstants.i, type_map.i
CVS new: system_settings.rb (sample) SystemSettings.i (SWIG file)
The sample should allow you to view the available information about
system colours, fonts and metrics (eg cursor size, display size) in a Grid.
2008 Nov 05
1
Constants in models are initialized before fixtures are loaded?
Hi,
here''s simplified code from the model:
class Foo < AR::Base
FIRST = Foo.first.id
end
The problem is that when testing I get well known error: "Called id
for nil...". I guess that this constant is initialized before the
fixtures are loaded.
Is there any way to fix it?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2011 Nov 20
1
place values into a matrix efficiently?
This question attacked me as I was thinking about matrix value updates.
I probably will never need to do this, but wanted to ask if there are
efficient methods to perform the for-loop in the following sequence.
%xymat<-matrix(rep(0,100) nr=10,nc=10) # empty matrix
%x<-1:10
%y<-sample.int(10,10,rep=T)
%for (j in 1:10) xymat[x[j],y[j]] <- some_function(x[j],y[j]) #to create
either
2016 Sep 12
1
Counterintuitive use of LLVMBool in C-API?
Of course, this is normal for C-APIs. But maybe change the name to
LLVMResult to propagate the real use? I am not arguing about the results
themself. They are standard. But the name is missguiding. As long as it's
consistent i know that i have to write an extra record operator in Delphi
to reflect this.
2016-09-12 11:11 GMT+02:00 David Chisnall <David.Chisnall at cl.cam.ac.uk>:
> On
2010 Jul 28
1
How to point a column of dataframe by a "character"
Hello,
Here is a dilemma I am having for a long time. But, I couldn't figure it
out.
I have an vector of Y and a data frame named "data",which contains all Xs. I
tried to be more efficient in fitting a simple linear regression with each
X.
Firstly,
for (i in 1:(dim(data)[2])){
model<-lm(Y~data[,i])
# this is not what I want since the name of coefficient will be data[,i]
# I
2012 Jan 27
0
[LLVMdev] [RFC] Module Flags Metadata
On Jan 24, 2012, at 9:11 PM, Nick Lewycky wrote:
> Yeah, I can't think of any use for something that would pull out NamedMDNodes for no reason. That said, if you want this to work, please audit the module cloner at the very least (it should copy the NamedMDNodes).
>
> But what would you do with llvm-extract?
llvm-extract already copies over named metadata.
> Should it keep a
2007 Jun 10
1
variable scope
caveat: I haven't either read actionscript language spec nor really
got through swfdec context, frame and such. This is fully based on
blocky.swf code inspection.
thanks to flare, i can extract the below beautiful code. You don't
need to understand the whole thing but there is one thing to notice:
border[XY]start are initialized in on(press) and get used in
on(release). Currently swfdec
2009 Mar 03
5
[LLVMdev] One way to support unwind on x86
Hi,
I want to support the unwind instruction on x86. Specifically I want to:
* Provide an efficient runtime implementation that does not
depend on reading the DWARF EH information.
* It should be self hosted, meaning the runtime is static
linked in. I want to use it kernel mode.
* Unwinding should be a read-only operation regarding the
stack, so I can create a stack dump in the