Displaying 20 results from an estimated 2000 matches similar to: "RXML vs form_tag etc"
2006 Nov 04
2
how to use LabellingFormBuilder
Railsers:
As usual for a product written very rapidly, most of its documentation
assumes some other documentation told you something critical.
For example, the file form_helper.rb tempts me with this documentation:
# <% form_for :person, @person, :url => { :action => "update" },
:builder => LabellingFormBuilder do |f| %>
That''s beautiful. Now what do I
2006 Nov 17
1
SQLite3 put a parse error in my schema.rb for timestamps
Railsers:
I switched from MySQL to Sqlite3 for Test-Driven Development. It meant
the difference between
(Long term, I want to understand the db:migrate system well enough
that I can run a long test, occassionally, that migrates everything to
MySQL and retests it there. That will prevent nasty surprises at
deployment time. But that''s not the current question!)
Because I don''t
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"
2006 Aug 15
5
Set up a default route
Phlip wrote:
> Can I fix it by adding a view called ''inventories''?
That worked, because I have a sufficiently late version of MySQL.
Next question. What does "Set up a default route" mean?
When I read...
http://wiki.rubyonrails.com/rails/pages/Routes
...it reminds me of the Apache documentation for mod_rewrite. I hope
someone appreciates the candor of my
2007 Feb 16
13
negate the regexp in validates_format_of
Railsters:
ActiveRecord''s validation system puts other database systems to shame.
However, the newbies might not know how to write a regexp that
excludes a match, instead of tests for it. Understand - I''m just
asking this question to help them. I have been using Regexps since
''grep'' on Xenix! But the newbies here might not know how to do this:
2006 Oct 30
1
domain language?
RSpeckers:
I went with RSpec instead of Systir because I downloaded and installed
the former first.
(I know that''s not exactly a ringing endorsement! ;-)
I want to compete with FIT and Fitnesse, like this:
http://www.zeroplayer.com/cgi-bin/wiki?TestFlea#tropism
(Click on a Green Bar to distend one test case.)
I want a domain-specific language in the parchment-colored area on the
2007 Oct 10
1
rxml cdata problem!!!!!
source)
xml.list {xml.cdata! "test"}
result)
<list>
<![CDATA[test]]>
</list>
but I want to
<list><![CDATA[test]]></list>
(because firefox don''t understand first result)
how to?????
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2007 Feb 04
1
dispatch.cgi -> Anonymous modules have no name
I upgraded to Rails 1.2.1 and deployed to my ISP, who has 1.2.1 ready
and waiting.
The site disappeared into an HTTP 500 error.
So I get into the site, run public/dispatch.cgi or dispatch.rb, and get this:
# ./dispatch.rb
Status: 400 Bad Request
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:405:in
`to_constant_name'': Anonymous modules have no
2007 Feb 14
5
FormTestHelper should change hidden fields
Railsoids:
FormTestHelper rules. It tests your response.body form at the same
time as it triggers your action, with all the parameters in that form.
This obviously improves quality.
But it took issue with this:
submit_form ''validate_stuff'' do |form|
form[''IBhidden''] = ''validate''
end
The field IBhidden is a hidden field. To be
2006 Apr 27
3
XML output
Hi,
Sorry abt the half finished post that I sent out earlier.
The idea is to generate an output xml response as such:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<response status=''NOT_AVAILABLE''>
<message>Some text</message>
<from>Me</from>
</response>
I make a request like such
2006 Aug 15
6
try creating a table for your model
Railers:
Greetings from the low end of the learning curve. I have installed all
the prerequisites on Win32, including a lite MySQL database with a
table in it called Inventory.
Then I run this command line...
ruby script/generate ajax_scaffold Inventory
...and I get this error message:
error Before updating scaffolding from new DB schema, try creating
a table for your model
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
2007 Mar 26
2
Issue generating XML with hyphenated element names
Hello...
I''m trying to generate and XML file using .rxml and I''m having a
problem with element names that contain a hyphen. Here is a chunk of
the .rxml file:
xml.instruct! :xml, :version=>"1.0"
xml.properties do
@properties.each do |p|
xml.property do
xml.location do
xml.street-address(p.street_address)
xml.city-name(p.city)
..
end
end
end
2007 Apr 04
2
unit tests?
Ezra et al:
I have this problem:
http://rubyforge.org/pipermail/backgroundrb-devel/2006-December/000578.html
Any progress on it? Or are unit tests simply impossible for now?
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
2006 Jul 03
2
XML Builder - xml header...
for some reason, i am getting an extra:
<?xml version = "1.0"?>
in my xml file..
i am using a file called:
lastLogins.rxml
and the code looks like:
xml = Builder::XmlMarkup.new
xml.instruct! :xml, :version=>"1.0", :encoding => ''ISO-8859-1''
xml.loginData do
@lastLogins.each do |login|
xml.entry do
xml.user(login.user)
2006 Nov 28
11
New Rails Site: Wordie
My latest stupid web trick, built, with love, in Rails:
http://wordie.org
Make lists of words. See who else likes the same words. Basically, it''s
a dating site. Built on thanksgiving while half-watching football and
launched yesterday. In other words, half-baked, but I thought some of
you might find it mildly amusing.
John
____________________________
John McGrath
Squirl: a site for
2007 Feb 11
3
RoR programming style guide?
Is there a style guide for RoR? For example, I see that rails likes
to create things like
<% ... %>
<% ... %>
<% ... %>
and I''m tempted to write this as
<%
...
...
...
%>
but I''m not sure if doing so will make my code "look wrong".
Since I''m a beginner, I''d like to get into the habit of writing code
that has a conventional
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/>"
2007 Jan 16
4
RJS - What the the advantages? / Why use?
Hi,
I''ve read up on RJS and understand the concept/how-to-use. It''s still not
clear in my mind when and why to use RJS? Can anyone drop in a couple of
bullet points re advantages + when/why would RJS make sense?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: