Displaying 20 results from an estimated 10000 matches similar to: "How to select between RXML and RHTML template at runtime ?"
2006 Jul 20
2
Why is my rxml view being wrapped by the rhtml template in views/layouts?
Why is my rxml view being wrapped by the rhtml template in views/
layouts?
I was experimenting with REST, I had a nice little test program with
one table: ''resources''. Here''s what the show method looks like:
def show
@resource = Resource.find(params[:id])
respond_to do |accepts|
accepts.html
accepts.xml
end
end
I have a show.rhtml
2005 Dec 22
3
How to specify SwitchTower SSH port
Hi !
Following Ezra's suggestions on http://brainspl.at/pages/perfect_vps,
I changed the port sshd listens to.
I'm trying to setup SwitchTower, and I don't know how to set the port.
Where should that be configured ? I can't see anything in
switchtower.rake, nor can I see it in the source.
If this already exists, can anybody point me to documentation. If
not, can I get any
2005 Dec 07
5
InPlaceEditor update of page contents ?
Hi all !
InPlaceEditor refreshes only the element that was updated. Is there
any way to make it update tons of other stuff ?
I have a table where changing a value in it causes changes in most
other cells (weight to percentage to money).
Thanks for any help !
--
François Beausoleil
http://blog.teksol.info/
_______________________________________________
Rails-spinoffs mailing list
2006 Feb 02
1
actionmailer - No rhtml, rxml, or delegate template
I''m getting this error when I try to send an email.
No rhtml, rxml, or delegate template found for signup_thanks
But I do have signup_thanks.rhtml in app/view/notifier
This is in the notifier model.
class Notifier < ActionMailer::Base
def signup_thanks(sent_at = Time.now)
@subject = "the subject works!"
@body["first_name"] = "first name"
2005 Oct 31
0
SELECT instead of INPUT in InPlaceEditor ?
Hi !
I'd like to know if it is possible to create a server-side generated
SELECT object instead of an INPUT for the InPlaceEditor. I guess it
is, because createEditField() seems to be devoted to that.
Unfortunately, my JavaScript skills are lacking. Can someone direct
me as to how to override a single method in a JavaScript object ?
I have the following HTML code:
<span
2006 Jun 08
1
No rhtml, rxml, or delegate template found
hi ,
i''m having a problem with rendering a partial , the partial is in the
apps/view/polls folder with the name : _antwoorden_user.rhtml
in the view i''m rendering it with
<% if @user %>
<%= render :partial => ''polls/antwoorden_user'', :locals => {:poll =>
@poll, :user => @user} %>
<% else %>
....
gives me the error =>
No
2005 Nov 08
2
Scriptaculous insertion fails when XHTML Strict used in FireFox
Hi !
I'm getting an uncaught exception requiring the Scriptaculous
libraries when everything says XHTML 1.0 Strict:
class ApplicationController < ActionController::Base
before_filter :set_content_type
protected
def set_content_type
response.headers['Content-Type'] = 'application/xhtml+xml;
charset=ISO-8859-1'
end
end
<?xml version="1.0"
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all,
Yesterday, I had some problems reading JPG files in my tests. Turns
out the problem was that Windows Ruby doesn't set it's Tempfile to
work in binary mode. Since I deploy on Linux, that has never been a
big problem, but now I'm working on some software that works with
binary files exclusively.
Anyway, I am making this fix available as a Rails plugin.
The details can be
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all,
Yesterday, I had some problems reading JPG files in my tests. Turns
out the problem was that Windows Ruby doesn't set it's Tempfile to
work in binary mode. Since I deploy on Linux, that has never been a
big problem, but now I'm working on some software that works with
binary files exclusively.
Anyway, I am making this fix available as a Rails plugin.
The details can be
2006 Sep 26
0
Is it possible to render RXML partials in RHTML templates?
I have a RHTML template and I would like the output of a RXML partial to
be embedded within it.
When I do <%= render(:partial => ''list_edit'') %> where there exists a
_list_edit.rmxl file, I get XML parsing errors in the browser - I
believe because the partial is causing the rendered content to be
identified as XML instead of HTML.
Is there any way to
2005 Nov 27
0
How to get raw_post in functional tests
Hi !
I'm testing PayPal integration, and am using the Paypal gem. The
Paypal gem requires the raw POST data, and not the pre-munged version
that Rails uses.
Running in dev mode, everything works fine, but in the tests, I can't
seem to get at the data.
I did:
class ActionController::TestRequest < AbstractRequest #:nodoc:
def raw_post
raise "RAW_POST Request"
end
end
2007 Mar 27
1
Ticket #7124
http://dev.rubyonrails.org/ticket/7124
I just attached a patch against 1.2 that cleanly applies to trunk too.
This allows functional and integration tests to have the same
interface to the xhr/xml_http_request method. The patch also includes
a deprecation workaround when called without the appropriate
parameters.
If the patch could also be applied to the 1.2 branch, I would appreciate.
The
2007 Feb 06
2
Testing RJS actions
Hi all !
This is my test:
def test_destroy_xhr
Article.expects(:find).with("1").returns(@article = mock("article"))
@article.expects(:destroy).returns(true)
delete :destroy, :id => 1, :format => :js
assert_template "destroy.rjs"
end
And my implementation:
def destroy
@article.destroy
respond_to do |format|
format.html {
2006 Mar 21
2
r3981 causes SystemStackError
http://dev.rubyonrails.org/changeset/3981
?!?
The changes are a rename of RailsInfoController to
Rails::InfoController. That seems to be completely unrelated to this
error:
$ ruby script\server
=> Booting WEBrick...
./script/../config/../vendor/rails/activesupport/lib/active_support/inflector.rb:121:in
`underscore': stack level too deep (SystemStackError)
from
2006 Nov 07
0
rxml template accidentally rendered within html layout
Hi,
I have the following in my controller:
def show
@quest = Quest.find(params[:id])
respond_to do |format|
format.html
format.xml
end
end
And in my routes:
map.resources :quests
I have two views for this action, quests/show.rhtml and
quests/show.rxml. Now what I would expect as a response to
''/quests/1.xml'' is that Rails sends, as XML, the rendered rxml
2006 May 30
2
No rhtml, rxml, rjs... problem with Action Mailer, again
Hi all
I have seen a lot of people writing my same problem but I haven''t found
the solution yet. This is the problem:
"ActionView::ActionViewError in Periodico#index
No rhtml, rxml, rjs or delegate template found for..."
when trying to send email through action mailer.
I have created the Notifier.rb model (in app/models/ folder)
def signupthanks(user)
# Email
2006 May 10
2
Circular dependency issue in startup
Hi all !
I am adding observers to some model objects. One of these uses
RailsCron. RailsCron adds a class method to ActiveRecord::Base.
Unfortunately, during the initialization phase, plugins aren't yet
loaded, so I can't setup my observers in config/environment.rb, as
suggested by the comments.
What's a poor dev to do ?
At the moment, I have fallen back to this:
# Require all
2006 Sep 08
1
has_many relationship extensions and scoping rules
Hi all !
Is this supposed to work ?
class Email < ActiveRecord::Base
has_many :to, :class_name => 'Recipient', :conditions =>
"recipients.source = 'to'" do
def create!(*args)
with_scope(:create => {:source => 'to'}) do
super
end
end
def build(*args)
with_scope(:create => {:source => 'to'}) do
2007 Jan 24
7
Differences between assert_tag and assert_select
Hi all,
I can't seem to make assert_select work for the more complex cases for me.
Here's a sample:
# View
<%= link_to_remote 'Add new', :url => new_phone_url, :submit => 'phones_head' %>
# Generated code:
<a href="#" onclick="new
Ajax.Request('http://test.host/admin/parties/phone/new',
{asynchronous:true, evalScripts:true,
2007 Mar 19
0
PGError "unknown column" on polymorphic association column
Hi all !
This is very strange. I am attempting to get my application running
on PostgreSQL (from MySQL), and I get this error:
ActiveRecord::StatementInvalid: PGError: ERREUR: la colonne «Party»
n'existe pas
: SELECT * FROM contact_routes WHERE (routable_type = "Party" AND
routable_id = 1000013) ORDER BY position DESC LIMIT 1