Displaying 20 results from an estimated 800 matches similar to: "link_to_remote from Controller"
2009 Mar 07
0
RJS: pass javascript variables in ruby calls
Hey,
I have this link_to_function which takes an RJS block as follows:
page.insert_html :bottom, :documents,
:partial => "upload_fields",
:locals => { :doc => Document.new, :index => ''UNIQUE_ID'' }
It adds a partial to a div. I need index to be a unique id, but can''t
generate one.
I have an actual javascript function next_index() that will
2011 Aug 24
3
Creating new variable with maximum visit date by group_id
Dear R users,
I am encoutering the following problem: I have a dataset with a 'unique_id' and different 'visit_date' (formatted as.Date, "%d/%m/%Y") per unique_id. I would like to create a new variable with the most recent date of visit per unique_id as shown below.
unique_id visit_date last_visit_date
1 01/06/2010 01/06/2011
1 01/01/2011 01/06/2011
1
2007 Dec 06
0
Stange behaviour with internet explorer
Hi!
I''m developing an application with Rails 1.2.6 and I''ve facing a weird
problem.
In a form, I''m using link_to_function that is aggregating a :partial,
the code is as follows:
<table>
<thead>
<tr>
<th>Marca</th>
<th>Porcentaje</th>
<th>Objetivo Mensual</th>
2007 Feb 13
1
Passing Arrays in recursive functions.
ok, I''m still new to ruby and new to rails. what I have is a task
database that acts_as_tree a task can have a children an those
children are full tasks so they can have children of their own, Tasks
can only be completed if they have no children, a task with children
is only completed if all its children are done. this much I have
working, I''m trying to add some Ajax support for
2007 Nov 21
4
Builder::XmlMarkup adds <inspect/> on printing and <clone/> on saving
Hello,
I am new in this group. Please give me a short hint, in case this is
the wrong place for my posting.
I want to create an XML file and store it in "filetransfer". The XML
part of the file (the body) sould go to "filetransfer.data". Despite
the last line, everything is fine with the code below.
With "filetransfer.save" two entries "<clone/>"
2005 May 01
5
Example using Builder::XmlMarkup and .rxml files?
Greetings,
I''m a newby to both "R"s in RoR. I would like to use Builder::XmlMarkup
to generate my pages. If there is a working downloadable example
somewhere, that would probably be enough. Otherwise, here''s what
I want to do:
With the following controller:
class AccountsController < ApplicationController
layout ''accounts''
model :account
2006 Jul 14
2
how to get builder 2.0 to escape attributes in rxml
I am using rxml to produce opml files and need to escape ampersands in
the attributes.
builder 2.0 docs found at http://builder.rubyforge.org/ show the
following
xml = Builder::XmlMarkup.new
xml.sample(:escaped=>"This&That", :unescaped=>:"Here&There")
xml.target! =>
<sample escaped="This&That"
2009 Dec 06
3
link_to_function or button_to_function memory usage
I have an full ajax app doing crud operations for contact info for one
section. I was using ajax calls to edit and cancel and also to add a
contact. I am implementing a button_to_function instead of doing an
ajax call to just edit/add/or cancel a contact. I am running into a
memory issue using the button_to_function or link_to_function.
I have this:
<%= link_to_function ''Edit
2006 Mar 18
2
Additional link tag attributes with link_to_function...
Hi,
I''m having a bit of a struggle with link_to_remote. Everything works
exactly as I want it, but the problem is that I want to add another
attribute to the <a>-tag, namely class="". Long story short, I want
specific links to look differently from others, but all of them being
link_to_function. Normally, I''d do this with adding a class="foo" to
2007 Jun 11
2
Builder::XmlMarkup and dashes
Has anyone hacked Builder::XmlMarkup to dasherize underscore tags by
default? I know I can use tag!, but I''d like to find a way for it to
translate underscores to dashes automatically. In other words:
xml.department_manager do
"fred
end
#=> <department-manager>fred</department-manager>
I tried hacking Builder::XmlBase.method_missing but got myself all
twisted up!
2009 Jan 21
1
AR to_xml problem with associations, Builder::XmlMarkup#to_a
When I do a to_xml(with a block) on an association of a model I got a
Builder::XmlMarkup#to_ary should return Array
Example that does not work.
@intervenant = Intervenant.find(params[:id])
output = @intervenant.to_xml( :skip_types => false, :dasherize =>
false) do |xml|
@intervenant.individu.to_xml( :builder => xml, :skip_instruct =>
true, :skip_types => false,
2007 Jun 29
4
asterisk call unique id in dialplan
Hi
how can i retrieve the call unique id of asterisk in the dialplan?
I have enabled the cdr logging on a postgres database.
In the table cdr each record has a field that assumes an unique id
(for example: 1141628669.51)
Can i retrieve this from the dialplan?
For example:
exten => 203,1,Answer
exten => 203,2,Set(CALLERID(name)=UNIQUE_ID - ${var_name_unique_id})
exten =>
2006 Jul 26
0
embedded DTD using Builder
Hello -
I would like to include an embedded DTD in generated XML output. I am
attempting to use the Builder::XmlMarkup class to do this. A simplified
example follows:
xml = Builder::XmlMarkup.new(:indent => 2)
xml.declare! :DOCTYPE,:logs do
xml.declare! :ELEMENT,:logs,''(log*)''
end
The problem that I am encountering is the that second declare! call
2010 May 17
0
ActiveResource 3 on MRI 191: NameError (uninitialized constant Builder::XmlBase::Symbol)
We''ve run into this before and, in this particular project, I''m
positive we had a hack somewhere to get AR to work but it seems to
have gone missing and I''m not finding any hints in git history or
Google. Any call to an AR.create will trigger it. Seems like a
strategically placed require or include did the trick but I''m probably
misremembering.
The offending
2009 Feb 19
0
Can't seem to instantiate Builder::XmlMarkup.new?
I am unable to instantiate the Builder::XmlMarkup.new on one
development machine ( Windows ) and upon my CentOS server. When I run
the same code on my Ubuntu 8.10 VMWare machine, everything runs great?
In the Builder documentation ( http://builder.rubyforge.org/ ) it
shows to put this at the top of the controller;
require ''rubygems''
require_gem ''builder''
but
2006 Jan 30
5
a RJS problem/patch
Hi,
add_rjs_to_action_view.rb of javascript_generator_templates
doesn''t work with setting Content-Type in a controller.
(e.g.) http://wiki.rubyonrails.org/rails/pages/HowtoSetDefaultEncoding
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=utf-8"
end
end
I
2018 Oct 16
2
high cpu load with share_conflict on browsing and opening files
Hello,
I have a server running samba version 4.7.1 on centos 7.5
1) A series of operations by a windows 10 (up to date) pc client consisting
of searching (or browsing)/opening/modifying/closing a (each time
different) file multiple times on a samba share containing many files (more
than 11000) goes fast for a while.
2) Then the same operation (or just the searching or opening) of the same
user
2007 Jun 26
3
what is the :or parameter in a submit_tag ?
I read the following tag in teh Beast example
<%= submit_tag''Login'', :or => link_to_function(''forgotten password'',
"$(''reset-password'').toggle();") %>
I understand the link_to_function, but what is this :or parameter used
for ?
the link doesn''t appear, so it cannot be used...
thanks for your lights
kad
--
2006 Jun 27
4
RJS Form Values
Hi,
I have the following code :
<%=link_to_function("? | China", update_page{|page|
page[''tags_en''].value = "China"
page[''tags_ch''].value = "?" }) %>
This updates two text fields with the China and ?. However I want to
append the values, not replace them. So I need something like this :
2005 Feb 27
2
smbldap_open: cannot access LDAP when not root ...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I am it has two weeks trying to twirl the PDC with samba + LDAP and ties
the moment only migraines. It would like to know which is the problem,
now, below described in mine log's?
[2005/02/27 12:14:47, 1] lib/smbldap.c:another_ldap_try(1004)
~ Connection to LDAP server failed for the 8 try!
[2005/02/27 12:14:48, 0]