Hi there, I''m fairly new to Rails and I''m trying to wrap my head around the whole REST concept. I''m creating an application that takes in sales data daily and at the end of the month it will create a batch of invoices in a Simply Accounting database. I''ve already worked out the details on connecting to the external (Simply) db and creating the invoices. What I don''t really get is how to do this with a RESTful controller. My thought was to create a MonthEnd resource. The ''new'' action would basically ask for a month, then the ''create'' action would actually build the invoices in the db. Does this sound ok, or is there a more elegant solution? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
sounds ok to me... ultimately it''s your app, you can do what you want. unless you plan on exposing a restful api to the world and seeking Roy Fielding''s blessing, who cares if it isn''t purely following the spec? On Nov 14, 3:53 pm, Anthony <afrusta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi there, > > I''m fairly new to Rails and I''m trying to wrap my head around the > whole REST concept. I''m creating an application that takes in sales > data daily and at the end of the month it will create a batch of > invoices in a Simply Accounting database. I''ve already worked out the > details on connecting to the external (Simply) db and creating the > invoices. What I don''t really get is how to do this with a RESTful > controller. > > My thought was to create a MonthEnd resource. The ''new'' action would > basically ask for a month, then the ''create'' action would actually > build the invoices in the db. > > Does this sound ok, or is there a more elegant solution? > > Thanks!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah, but I thought the whole point of Rails was that it was "opinionated". Of course you can do whatever you want however you want, but there''s a "preferred" way of doing things in Rails, right? That''s what I''m trying to learn. On Nov 14, 1:43 pm, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> sounds ok to me... ultimately it''s your app, you can do what you > want. unless you plan on exposing a restful api to the world and > seeking Roy Fielding''s blessing, who cares if it isn''t purely > following the spec? > > On Nov 14, 3:53 pm, Anthony <afrusta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi there, > > > I''m fairly new to Rails and I''m trying to wrap my head around the > > whole REST concept. I''m creating an application that takes in sales > > data daily and at the end of the month it will create a batch of > > invoices in a Simply Accounting database. I''ve already worked out the > > details on connecting to the external (Simply) db and creating the > > invoices. What I don''t really get is how to do this with a RESTful > > controller. > > > My thought was to create a MonthEnd resource. The ''new'' action would > > basically ask for a month, then the ''create'' action would actually > > build the invoices in the db. > > > Does this sound ok, or is there a more elegant solution? > > > Thanks!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---