So would this be the "conventional" naming pattern?<br><br>DB Table: fiscal_transactions (model_names)<br>Model: fiscal_transaction (model_name)<br>Class: FiscalTransaction (ModelName)<br>Controller: fiscal_transactions (model_names)
<br>View Reference: (as follows)<br><br><% for fiscal_transaction in @fiscal_transactions %><br> <html stuff><%= fiscal_transaction.amount %></html stuff><br><% end %><br><br>Thanks again, Dave
<br><br><div><span class="gmail_quote">On 12/31/05, <b class="gmail_sendername">Derek Haynes</b> <<a href="mailto:derek.haynes@highgroove.com">derek.haynes@highgroove.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
D'Andrew,<br><br>> How do I refer to the model in the view<br>> layer? Do I use f_transaction, ftransaction?<br><br>Use FTransaction (the name of the class):<br>FTransaction.find(12) << - Find the transaction with an id of 12.
<br><br>> Along the same naming issue, when defining a method "recent_ftransactions"<br>> how does the naming work here too (re: underscoring)?<br><br>Just keep your method names all lowercase. It doesn't matter what you
<br>name your methods. So yes, #recent_ftransactions would work.<br><br>- Derek<br><br><br><br>On 12/31/05, D'Andrew Dave Thompson <<a href="mailto:dandrew.thompson@gmail.com">dandrew.thompson@gmail.com</a>> wrote:<br>
> Greetings:<br>><br>> I am writing a basic accounting module for an app. Rather unfortunately the<br>> name "transactions" is a reserved term in Rails (being the only accounting<br>> term trully representational of a financial transaction). I am left to come
<br>> up with other names. One such name was f_transaction.<br>><br>> This worked on the DB level, but I noticed that the Model name dropped the<br>> underscore, thus "FTransaction". How do I refer to the model in the view
<br>> layer? Do I use f_transaction, ftransaction? Either way it is currently<br>> returning a nill object at the moment.<br>><br>> Along the same naming issue, when defining a method "recent_ftransactions"
<br>> how does the naming work here too (re: underscoring)?<br>><br>> Thanks, Dave<br>><br>> --<br>> ~~~~~~~~~~~~~~~~~~~<br>> D'Andrew "Dave" Thompson<br>> <a href="http://dathompson.blogspot.com">
http://dathompson.blogspot.com</a><br>> _______________________________________________<br>> Rails mailing list<br>> <a href="mailto:Rails@lists.rubyonrails.org">Rails@lists.rubyonrails.org</a><br>> <a href="http://lists.rubyonrails.org/mailman/listinfo/rails">
http://lists.rubyonrails.org/mailman/listinfo/rails</a><br>><br>><br>><br><br><br>--<br>Derek Haynes<br>HighGroove Studios - <a href="http://www.highgroove.com">http://www.highgroove.com</a><br>Atlanta, GA<br>Keeping it Simple.
<br>404.593.4879<br>_______________________________________________<br>Rails mailing list<br><a href="mailto:Rails@lists.rubyonrails.org">Rails@lists.rubyonrails.org</a><br><a href="http://lists.rubyonrails.org/mailman/listinfo/rails">
http://lists.rubyonrails.org/mailman/listinfo/rails</a><br></blockquote></div><br><br clear="all"><br>-- <br>~~~~~~~~~~~~~~~~~~~<br>D'Andrew "Dave" Thompson<br><a href="http://dathompson.blogspot.com">http://dathompson.blogspot.com
</a>