On 17 December 2015 at 12:25, Travis Eubanks <[email protected]> wrote: >> It might be worth using STI but I would start the simple way and see >> how it pans out. Refactoring for that sort of change should not be >> difficult. >> >> You might want to consider having expense_type as a table so that you >> can add expense types without changing the code. Expense belongs_to >> expense_type, but that may or may not be appropriate for your >> requirement. >> >> Colin > > > > Ok so it would be just one form with the options of selecting the type > of expense.
Now you are asking (I think) about what your user interface should look like. That is up to you. > Then for my requirements I could just use scopes when > querying (i.e. "Give me all expenses for this user that are business > entertainment.")n essentially right? Using scopes is often a good idea, it can save typing and aid understanding. > > Cause each expense has a pre defined GL code for it so would you think > it would be best to build a Case and When method to preset those before > it saves? I have no idea what you are asking here. Sorry. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLu-uAQr8N7qEVAY67gdz9dQcPO1w14mJH9NSefhHiQnZQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

