similar to: Issue generating XML with hyphenated element names

Displaying 20 results from an estimated 1100 matches similar to: "Issue generating XML with hyphenated element names"

2007 Apr 07
2
functional test question
I have a view that passes two params hashes (:user and :school) to my controller action. In the functional test for the controller action, how do pass these two hashes? I tried the following that did not work get(:create, [:user => {:firstname => ''xxx'', :lastname => ''yyyy''}, :school => {:id => 1}] ) It seems to pick only the first array
2007 Apr 08
3
Updater and PeriodicUpdater fighting with one another
I have a long-running process to build a directory tree in a database from a very large and deep folder structure. I am using sessions for security, but the process takes so long that it never finishes. Having tried and failed to override the session time-out, I am trying to work around the problem by having a PeriodicUpdater tickle the session by loading a page every minute. But I am also
2008 Feb 25
1
NoMethodError: undefined method `<=>' for :zip:Symbol
Long time programmer, but I just started learning RoR last week. I am going through some examples in the book "Ruby on Rails: Up and Running". The example I am on had me add a table to the database that looks like so: CREATE TABLE people ( `id` int(11) NOT NULL auto_increment, `type` varchar(20) default NULL, `name` varchar(20) default NULL, `email` varchar(30) default NULL,
2009 May 14
6
Generated test files and bad require 'test_helper'
Why do the generated test files have: require ''test_helper'' It cannot obviously find the file because it''s located in a subdirectory. That''s annoying. -- Posted via http://www.ruby-forum.com/.
2007 Apr 15
5
Railsplayground.com down?
I can''t access my account page, my hosting page or their main site? Anyone else having this issue as well? traceroutes and pings return nothing at present. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 May 10
4
How to generate UML diagrams from existing ruby code?
Hi, thanks for reading. Till now, I''ve used railroad to visualize my models. But as far as I can see, there''s no possibility to add information about the model class methods. Methods are only added to a diagram, if you visualize your controllers. Is there a way to change this behavior? I''ve looked out for something else and found ''ruby-uml'', seems to
2006 Nov 21
1
RXML vs form_tag etc
Railsers: The documentation for *.rhtml views invariably mentions *.rxml views. They sound like a Good Thing, because some of my generating code mixes Ruby and HTML so densely that the code is full of %><% markers. Dropping down to only one language would be a blessing. However, this documentation invariably avoids mentioning one tiny, insignificant detail: How do you inject raw HTML
2008 Nov 01
2
stuck on a validates_presence_of unless issue
i have a person object. Persons don''t need to have addresses, but if they have any address field value, they must have them all. So I have something like this: validates_presence_of :street_address, :city, :state, :postal_code unless :address_blank? address_blank? checks whether all of the address fields are blank. If I run a test like this, it works: describe "given
2009 May 05
9
no sql in the controller guideline
hello. i just checked Chad Fowler''s post "20 Rails Development No-No''s" and one guideline caught my attention. it says: "Nothing that looks at all like SQL should go into a controller, view, or helper." it really came as a surprise to me as Rails itself seems to go against such practice by its AR ''conditions'' option, which most of the times
2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this call to create html formated email and save it to the database. This is easy enough in a controller with yournewhost.email = render_to_string :action => "email_newhost_ready", :layout => false But render_to_string is only available in controller action pack, is there a easy way to render_to_string in a Model? Or
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
2012 Nov 29
2
[Rails 3.2] form_tag w :remote => true doesn't fire up the js format
I have a form_tag written like this : = form_tag search_backoffice_places_path, {:remote =>"true", :id => :searchplaceForm } do .. input fields = submit_tag t(:search) generated html is correct : <form accept-charset="UTF-8" action="/en/backoffice/places/search" data-remote="true" id="searchplaceForm" method="post"> ...
2008 Apr 28
4
Render partial from model?
Hi, I know that this goes against MVC, but is there any way to render a partial from a model? The reason for me wanting to do this is that the caching logic is quite complex and I would like to keep it in the model. Thanks, GiantCranes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
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 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&amp;There") xml.target! => <sample escaped="This&amp;That"
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
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)
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
2009 May 04
5
moving a project from windows to linux
How easy is it to do this. Is it simply a case of copying the project directory over to the linux directory or does one have to create a new project in the linux system and copy paste (due to the wonders of rails magic)??? -- Posted via http://www.ruby-forum.com/.
2009 Apr 09
4
Weird analyzer issue with the word ''fly''
Hi all I''m using a_a_f in rails with a StemmingAnalyzer, in the index and in my search. I got the idea from this topic: http://www.ruby-forum.com/topic/80178 I''m having a problem with some search terms - i narrowed one of them down to the inclusion of the word ''fly''. Can anyone give me any clues at to what might be happening, or even how i can investigate?