Displaying 20 results from an estimated 10000 matches similar to: "passing an entire hash to an action"
2007 Nov 02
2
Concatenate strings
Hi everyone.
Mandatory disclaimer: New to puppet/clueless but learning/please don''t get
fed up with me yet...
Mandatory praise: Love puppet so far...
Mandatory stupid first question:
How do I concatenate a variable to an arbitrary string?
ie.
$someval="$hostname_prod_config"
So if $hostname is "myserver", then $someval should result in
2015 Aug 10
3
Possible bug in adjusting PHINode from removePredecessor?
Hi,
Simple description of the problem below. I have code coming into
pruneEH as follows
fn a {
entry:
call fn b
...
for_cond:
%i = phi [1, entry] [%x, for_body]
cmp $i with someval
cond-br for_body or for_exit
for_body:
...
$x = $i + 1
branch for_cond
for_exit
...
}
PruneEH determines that the call to fn-b won't return. The code is
modified thus.
fn a {
entry:
call fn b
unreachable insn
2006 Apr 19
2
how to pass a hash as a parameter in link_to_remote
When using link_to_remote, I''d like to pass along some auxiliary data in
the request. It''s a hash of dynamic data that can change with each
request.
But I get an error when rails trying to "stringify" the hash.
For the regular link_to, it works because it turns the hash into a
regular GET-like query string.
I''m expecting to be able to get my hash as
2006 Jan 26
2
link_to_remote > in :action , interrupt ajax to render a new page outside the :update div ?
Hello,
I have a simple link_to_remote that refresh a div. I just want to know
if it''s possible to interrupt the div''s refresh inside :action to
perform a complete reload of the page, outside of the div
Actually, I havea a new page, but loaded inside the ":update" div.
Someone have an idea please ?
the rhtml:
****
link_to_remote "yeah" , :update =>
2006 Aug 24
1
link_to_remote parameters - help
I''m trying to show a preview of the comments, and I''m saving the
comments through AJAX. So, I thought that I should be able to mimic the
"comments" action for the "comments_preview" action very easily. So
far, this isn''t the case.
I have a link_to_remote tag inside of the form tag, and I don''t know how
to send the parameters that are
2006 Jan 17
2
link_to_remote() - can I post data with it???
can I post data with link_to_remote(),
link_to() has special option :post => true and viola
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/2a0a00af/attachment.html
2006 Feb 28
4
No action from AJAX link_to_remote...
AJAX & Ruby & Rails newbie here.
I''ve got a link to remote that I believe should be working, but doesn''t
seem in fact to do *anything*. I''m looking at the webrick log, since
the Book says I should be seeing some hot POST action in there, but
there''s literally no change when I click on the JS link. From looking at
the source that''s
2006 May 18
3
Two-Dimensional Hashes through links?
I''m really hitting a wall here. My program has a search engine, returns
a list of results. I am using a two-dimensional hash to pass the form
data back to my controller. (i.e. params[:job] => {:description =>
"xxx", :location => "xxx", company => "xxx"}) I use that Job object to
search my database, and then wait for user input.
Now when the
2011 Nov 11
2
One step way to create data frame with variable "variable names"?
Suppose
plotx <- "someName"
modx <- "otherName"
plotxRange <- c(10,20)
modxVals <- c(1,2,3)
It often happens I want to create a dataframe or object with plotx or
modx as the variable names. But can't understand syntax to do that.
I can get this done in 2 steps, creating the data frame and then
assigning names, as in
newdf <- data.frame( c(1, 2, 3, 4),
1998 Nov 18
1
0.63 naming list elements
The following used to work (0.62.1 the latest that I used), and now
it doesn't (0.63.0):
force <- vector(mode = "list", length = 1)
names(force)[1] <- somename
It returns the error:
Error in "[<-"(NULL, 1) : object is not subsetable
You might argue that this approach is unnecessary now that R allows
subscripts that are out of range (e.g., force<-list();
2009 Jul 11
6
conditional link_to_remote not re-rendering
I have an int, ''floorfrozen,'' in my table, ''channels'' that can take a
value of 0 or 1.
When I render a page, an image in a link_to_remote is called
differently depending what the value of channel.floorfrozen is, in a
partial, as follows:
<% if @channel.floorfrozen %>
<%= link_to_remote image_tag("/images/icecube.gif"), {:url =>
2010 Jan 13
2
[Ajax on Rails]How to pass an object via param
I''m trying to pass an object as a parameter on a link_to_remote. What
I do is pretty simple:
link_to_remote ''Insert subquestion'', :url => {:action =>
''add_subquestion'', :question => @question}, :update => '''', :method
=> :get
But, obviously, what I get is a string which has the address of the
object. Can I
2006 Apr 13
1
Adding a title to an AJAX link.
Hello all.
I am trying to add a title to a link_to_remote created AJAX link.
What I want to create is:
<a href="#" title="VALUE-HERE" onclick="new Ajax.Updater(''content'',
''/area/show/28/40'', {asynchronous:true, evalScripts:true}); return
false;">Area Name</a>
However I cannot seem to get it to work, the API says
2011 Jun 11
2
Inspecting C code in an R package
Hello everyone,
Trying to comprehend code of an R package, I encountered the problem that
the interesting part of the
function I'm inspecting is written in C-Code and called by ".C("somename",
....)". Now I can't inspect the C-Code the function is calling since I can't
find it in the folder of the package.
Does someone know, where the corresponding C-Code ist
2006 Jun 07
2
How to send post data with link_to_remote?
Hi,
I''m trying to send a post body with my link_to_remote call.
Prototype supports the ''postBody'' option, but I can''t seem to get
link_to_remote to set that.
Here''s what I''m trying:
link_to_remote ''move up'',
:url => { :controller => ''upload'', :action => ''position_ajax'', :id
2007 May 10
2
link_to_remote fix, should this be added to edge rails?
After looking at the link_to_remote tag for the first time, I found it
broke when javascript was disabled.
Below is one possible solution I found and would like to suggest that
this idea is promoted into rails.
#
# provide fix for link_to_remote tag when javascript is not enabled
def link_to_remote_fix(text, options)
link_to_remote text, options, :href => url_for(
2006 Aug 17
2
link_to_remote question
I''m using link_to_remote to call a method that deletes an item
<%= link_to_remote " [delete]", :url => { :controller => ''user_admin'',
:action => ''employee_type_delete'',
:id => employee_type.id
}
2006 Jul 16
7
RJS and Action Renders but page doesn''t update
All,
I am trying to perform a simple ajax task and am having some difficulties with the page showing the response. The action performs, but no response on the page.
I have found examples on the web and I believe I have copied and pasted exactly what works from the demo site. However, on my system it isn''t finishing. For a simple test, I have limited it down to an alert.
2005 Oct 28
1
Actionless self-referential views , logic in my views, yes, but less LOC. One draw back, it dont work.
<%= render (:partial => "collapsed_blog" , :locals => {:be => be ,
:hide => "yes"}) %>
This above code is in a .rhtml page.
Here is the partial it renders:
<p class=<%="blog_content" + be.id.to_s%>>
<% if hide == "yes" %>
<%= be.blogshorttext %>
<%= link_to_remote ('' [See Full Text ('' +
2006 Mar 01
4
link_to_remote, doesn''t receives params?????
Hi,
I''m using link_to_remote to trigger an ajax zone, but
depends on a varaible, the new zone has different
features. before I has a button inside a form. so when
I click on the button, I get the value of the variable
inside "params". but since I use link_to_remote now, I
don''t get any value from params anymore.... Is there
some way I can get the data inside a form