search for: dasherize

Displaying 20 results from an estimated 24 matches for "dasherize".

2006 Dec 03
0
How to best change the default value of dasherize (using Edge Rails, and knowing about :dasherize => false)?
Hi all, I''m trying to turn off dasherize in all cases, since converting underscores to hyphens breaks the way that I want to handle XML (with E4X in Flex 2). I''ve read the other threads about dasherize on this list. I''m on Edge Rails, so I can successfully turn off dasherize for a single usage with something like rend...
2006 Jul 31
2
is it possible to make to_xml use underscore instead of dash?
...o produce XML with render :xml => @user.to_xml However, on the client end it is a bit annoying for me to deal with attributes like first-name. I would much rather have first_name. Is there any way for me to turn off the behavior of converting _ to -? This seems to be done by a call to dasherize inside the to_xml of ActiveSupport::CoreExtensions::Array::Conversions, so I''m a bit out of my depth... Thanks, Peter Armstrong
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, :dasherize => false) do |xml_individu| #do special stuff at this level..... end end Ex that do work but seems little bit dirty: @intervenan...
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::Xm...
2008 Apr 22
0
Overriding to_xml() - Why Does This Work?
In Chapter 5 of his book, Flexible Rails, Peter Armstrong''s leads his readers through an exercise to override the behavior of to_xml() in ActiveRecord objects so that :dasherize would be false by default. I found his solution inelegant. I came up with a more elegant one, and it seems to work. All I did was add the following to the very end of myapp/config/ environment.rb: class ActiveRecord::Base def to_xml(options=nil, &block) super options == nil ? { :dashe...
2006 Jun 20
3
How to get hold of a patch
I have been researching a problem and found that ticket 4989 solves my problem (to_xml has new dasherize option). I am new to RoR and was wondering if the patch that has been mentioned is available for public release. If so where can I find it and how to apply? Thank you Andrew -- Posted via http://www.ruby-forum.com/.
2008 Nov 10
3
to_xml and helper methods
Hi, I have an array with objects and I want to generate an XML like: <objects> <object> <category_id>1</category_id> <helper-method>result 1</helper-method> </object> <object> <category_id>2</category_id> <helper-method>result 2</helper-method> </object> </objects> The helper
2006 Aug 15
2
to_xml and underscores
hi, i am looking for a solution whereupon calling myEntityObject.to_xml does not convert my attributes containing underscores into hyphens. at the moment an attribute named "my_own_attribute" is converted into <my-own-attribute>. does anybody have an idea how to change that and have to_xml generate <my_own_attribute> thanks ciao robertj -- Posted via
2009 Jan 09
2
Confused about to_xml() in ActiveRecord::Base subclass
Since all my efforts to control how to_xml() is formatting dates has failed, I''m now considering writing my own to_xml(). However, from the limited examples I''ve found, I just don''t understand how to actually reference the columns for the records in my record set. Here''s a simplified view of my ActiveRecord object: class Errors < ActiveRecord::Base
2007 Mar 19
2
Upgrading software under Wine
I run several program under Wine. Two I'm especially reliant on are Password Safe, an open source password manager, and Dasher, a new interface for playing on the Internet Chess Club. Both these programs are being actively developed and are frequently upgraded. I always backup the previous version, then install the upgrade by running the installer, such as "wine
2007 Mar 19
0
Any chess players here?
The Internet Chess Club, launched a new chess interface in August. Besides being a terrific client for connecting and playing chess on ICC, it has a built-in chess engine with 14 personalities from beginner to GM's that you can play off-line. You can also add-in other chess engines. If you try it, I'm sure you'll agree it is one of the best chess clients available. It is now at
2007 Sep 30
1
to_xml node names with underscores
When I call to_xml on my active record objects, it replaces underscores with hypens. E.g.: <categories> <category> <content-provider-id type="integer">1</content-provider-id> <id type="integer">2</id> <name>Traffic Alerts</name> </category> </categories> When the actual field is content_provider_id. I remember
2009 Apr 18
1
RESTful posting
I''m implementing a Rails front end to a Windows system by using RESTful web services to send data back and forth. Luckyly all the business objects in the Windows system know how to serialize themselves into XML so it''s not too complicated. But when I looked at the XML that gets sent back to the service in a POST when you do a myresource.save, all the fields that had underscores
2009 Apr 28
0
Writing an imgae tag in to_xml
Hi, I am trying to create an pdf report by using ruby jasper pages. For that I have written customer_list.rxml file like this: xml.instruct! xml.customer_list_result do xml.invoice_customers do @customers.each do |customer| xml << customer.to_xml(:dasherize=>false,:skip_instruct=>true,:only=>[:id,:name,:city],:root=>"customer") end end end I want to add an image tag into this xml data, so that image will be displayed on the pdf. I have customer_image field in customers table. Can anyone help me out for this? Thanks, Tusha...
2007 Oct 24
7
NoMethodError when creating new ActiveRecord model object
...d-1.15.4/lib/active_record/base.rb:1675:in `attributes='' -------------------------- in my controller: def edit_xml() @email_config = EmailConfig.find(params[:id]) @email_recipient = EmailRecipient.new(:email_config_id => @email_config.id) render :xml => @email_config.to_xml(:dasherize => false, :include => [ :email_recipients ]) end -------------------------- my models: class EmailConfig < ActiveRecord::Base has_many :email_recipients validates_presence_of :name, :from, :subject, :template end class EmailRecipient < ActiveRecord::Base belongs_to :email_c...
2006 Jun 21
2
Using RJS to highlight one LI if using insert_html on an UL?
It seems common to use RJS for quickly adding and highlighting a list that is having content added to it like this: http://rafb.net/paste/results/Z3m32g48.html ... where "my_list" would be an UL and the partial would insert a LI. Given that example, is there an easy way to highlight only the newly inserted LI instead of the whole UL? The only way I can see to do it is to give
2002 Oct 04
0
New High Performance Rink System Installed In Washington State
New Lynnwood Ice Rink Reopens In September With New High Performance Rink System LYNNWOOD -- A new ice arena will open in Lynnwood Sept. 15, about four months after the SnoKing Ice Arena closed. Washington Ice Skating Association, which owns both the former SnoKing rink and the Olympicview private ice rink in Mountlake Terrace, is remodeling and reopening the rink as the Lynnwood Ice Center.
2015 Feb 20
0
Wine release 1.7.37
The Wine development release 1.7.37 is now available. What's new in this release (see below for details): - Interface change notifications. - Support for the UTF-7 encoding. - A number of graphical fixes for themed controls. - Wininet now implemented on top of Win32 sockets. - Various bug fixes. The source is available from the following locations:
2013 Nov 22
0
Wine release 1.7.7
The Wine development release 1.7.7 is now available. What's new in this release (see below for details): - Support for configuring remote shares using Samba's NetAPI library. - Multiple keyboard layouts support in the Mac driver. - Improved embedding support through XEMBED. - Support for arrays in VBScript. - Various bug fixes. The source is available from the following
2008 Apr 22
1
32-bit Centos 5.1 kickstart hangs on xen domU HVM installation
I am trying to a install Centos 5.1 32-bit Xen HVM DomU onto a Centos 5.1 64bit DomU with the default xen installed and the kickstart hangs at random points during the install process. Sometimes retrieving the image, sometimes formatting the filesystem, sometimes installing the packages,etc. I tried upgrading to xen 3.2 and encounter the same problem before rebuilding back to stock Centos 5.1