Search Results

Search found 4 results on 1 pages for 'svenfuchs'.

Page 1/1 | 1 

  • How to make Nokogiri transparently return un/encoded Html entities untouched?

    - by svenfuchs
    How can I use Nokogiri with having html entities (like German umlauts) untouched? I.e.: # this is fine node = Nokogiri::HTML.fragment('<p>&ouml;</p>') node.to_s # => '<p>&ouml;</p>' # this is not node = Nokogiri::HTML.fragment('<p>ö</p>') node.to_s # => '<p>&ouml;</p>' # this is what I need node = Nokogiri::HTML.fragment('<p>ö</p>') node.to_s # => '<p>ö</p>' I've tried to mess with both PARSE_OPTIONS and :save_with options but could not come up with a way to have Nokogiri just transparently behave like above. Any pointers?

    Read the article

  • How do I switch Ruby-on-Rails into en-UK

    - by Nick Clarke
    Hi, I'm trying to switch one of my websites into en-UK so that I get the correct date and currency formats etc... I have found this yaml file: http://github.com/mattetti/globalite/blob/master/lang/rails/en-UK.yml Any ideas if there is a better one to use? I also checked here but could not see it: http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale Thanks, Nick

    Read the article

  • Rails 2.3.5 model name translation problem in error messages

    - by Jason Nerer
    Hi Rails'ers, I encountered some problem while trying to translate my model's names and attributes in a Rails 2.3.5 app. I have the following model: class BillingPlan < ActiveRecord::Base validates_presence_of :billing_option_id belongs_to :order belongs_to :user belongs_to :billing_option end When validation fails, my models attributes are translated correctly, but the modelname itself is not. I use the following translation skeleton in de.yml de: activerecord: models: shipping_plan: "Versandart" billing_plan: "Rechnungsart" attributes: shipping_plan: shipping_option_id: "Versandoption" billing_plan: billing_option_id: "Rechnungsoption" Basis for my translation file is: http://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/de.yml Can anyone help? Thx in advance J.

    Read the article

  • how to change locale in URL using Routing Filter gem Rails I18n application?

    - by Zack Xu
    I installed and set up routing-filter as described on the gem documentation page. https://github.com/svenfuchs/routing-filter It works for the default locale. For example, if I set up my default locale as :en,the site is in English, and if I set my default locale as :zh, the site is in Chinese. www.site.com/zh/home (the default locale path /en is automatically added to the URL) But how can I make my site support BOTH languages? when the default locale is :zh, I tried to change the URL by substituting the "zh" with "en" but the page is still in Chinese, not English. Is this something not supported by the routing-filter gem? If not, is there some other gem I can use? Or have I not set up the routing-filter gem properly? Thanks!

    Read the article

1