trailblazer / roar-rails

Use Roar's representers in Rails.
http://roar.apotomo.de
MIT License
235 stars 65 forks source link

Rails Generators - Coder Needed! #16

Open apotonick opened 12 years ago

apotonick commented 12 years ago

We could need generators for creating representers in Rails. Anyone?

Usage could be like

rails g roar:representer singer name band:Band albums:collection

This API is subject to discussion, what kind of properties are common and could be handy being generated from the command line?

Examples for writing and testing generators can be found here:

lucasallan commented 12 years ago

Do you have any example that how this representer should be?

apotonick commented 12 years ago
module SingerRepresenter
  include Roar::Representer::JSON # should be a switch in the generator for other formats like XML or HTML

  property :name, :extend => BandRepresenter, :class => Band
  collection :albumns
end
guiocavalcanti commented 11 years ago

Hey @apotonick, I'm going to tackle this one, ok? I'll pull request you as soon as I have something working.

apotonick commented 11 years ago

:heart:

On Mon, Jul 29, 2013 at 10:37 PM, Guilherme Cavalcanti < notifications@github.com> wrote:

Hey @apotonick https://github.com/apotonick, I'll tackle this one, ok? I pull request you as soon as I have something working.

— Reply to this email directly or view it on GitHubhttps://github.com/apotonick/roar-rails/issues/16#issuecomment-21716743 .

guiocavalcanti commented 8 years ago

Hey @apotonick is there anything I could do to improve this feature?

apotonick commented 8 years ago

Let's chat here: https://gitter.im/trailblazer/chat :heart: