Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve how to deal with multiple metadata fields #5

Open
cavalle opened this issue May 3, 2012 · 0 comments
Open

Improve how to deal with multiple metadata fields #5

cavalle opened this issue May 3, 2012 · 0 comments

Comments

@cavalle
Copy link
Contributor

cavalle commented May 3, 2012

Currently this is the only way you can set metadata fields of type multiple using Almodovar:

title.metadata.update :metadata => { :genres => [ {:genre => "Drama"}, {:genre => "Thriller"}] }

that generates the following XML…

<metadata>
  <genres type="array">
    <genre>
      <genre>Drama</genre>
    </genre>
    <genre>
      <genre>Thriller</genre>
    </genre>
  </genres>
</metadata>

…which is not the right XML but still it seems to work thanks to some ActiveSupport's black magic in the side of the server.

Ugly.

What Almodovar should support is this:

title.metadata.update :metadata => { :genres => ["Drama", "Thriller"] }

…which would generate this:

<metadata>
  <genres type="array">
    <genre>Drama</genre>
    <genre>Thriller</genre>
  </genres>
</metadata>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant