I use:
<%= link_to_remote(“Update”,
:update => ‘mydiv’,
:url => { :action => :create, :host => ‘rails’ }) %>
which generates the following:
as a result /account/create is routed to http:/localhost//account/create
(which runs mod Python) and
not as I would like (and need) to http://rails/account/create
Using the following:
<%= link_to_remote(“Update 2”,
:update => ‘mydiv’,
:url => ‘http://rails/account/create’ ) %>
doesn’t work either. It results in using the correct url, but the url
parameter seems to be not correct:
TypeError in Account#create
can’t dup NilClass
RAILS_ROOT: C:/Projects/Athena/rails/public/…/config/…
Application Trace | Framework Trace | Full Trace
#{RAILS_ROOT}/vendor/plugins/javascript_generator_templates/lib/add_rjs_to_action_controller.rb:41:in
`dup’
the controller contains:
def create
render :layout => false
end
create.rhtml contains:
Hello from Ajax!
new.rhtml contains:
<%= javascript_include_tag :defaults %>
<%= link_to_remote(“Update”,
:update => ‘mydiv’,
:url => { :action => :create, :host => ‘rails’ }) %>
This text will be changed 2
Does anybody have any idea on how to work around this problem?
Thanks,
Willi