Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7667151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:01:40+00:00 2026-05-31T15:01:40+00:00

So I am trying to implement nice meta-data concept in my application. Basically, I

  • 0

So I am trying to implement nice meta-data concept in my application. Basically, I store some details in XML format in a single column in the database but in my application I can access them through a Hash.

def extra_info=(data)
    data = {} unless data.is_a?(Hash)
    self[:extra_info] = data.to_xml(:dasherize => false)
end

def extra_info
   Hash.from_xml(self[:extra_info])['hash']
end

Rather simple, following what I read on a blog post on the subject.

However, now my application throws an error:

ERROR ArgumentError: wrong number of arguments (1 for 0)
.../app/models/users/usage.rb:35:in to_xml

So I tried this

def extra_info=(data)
    data = {} unless data.is_a?(Hash)
    self[:extra_info] = data.to_xml
end

And still I get the same error! Anyone faced this issue? What’s wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:01:43+00:00Added an answer on May 31, 2026 at 3:01 pm

    Turns out this was a backward compatibility issue with the version of builder included in Rails. Problem with REE only.

    From elisehuard on github:

    in Ruby 1.8.7 arity of method to_xs is 0 – in 1.9.2 it takes encoding

    Criminal. Anyway, much thanks to her for the fix, which can be found here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement some front end testing in a ASP.NET web application, and
im trying to implement some behaviors when a mapview element scrolls... by coding a
Found a really nice code for Accordion nav and am trying implement on our
I am trying to implement Twitter's OAuth into my Code Igniter web application at
I am trying to find a nice way to implement a text slider (examples:
I'm trying to implement this method of making a nice form upload: www.kavoir.com/2009/02/styling-file-upload-select-input-control-input-typefile.html/ which
im trying to implement a nice gui for organizing posts. i want to use
I'm trying to implement a captcha system, and I found a nice and very
I'm currently trying to implement some reporting functionality which requires me to transform some
I got Spring 2.5.6 and I'm trying to implement some stupid functionality within. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.