Symbols on the Rails

Asked

Viewed 66 times

1

After creating a template in Rails it is possible to change the created Symbol?

For example I created a template called transaction, Rails creates plural transaction but I would like to change this name for transactions is possible?

2 answers

1


By changing the config/initializers/inflections.Rb file you can configure the pluralization in Rails. I recommend reading the Caelum booklet to better understand.

Ruby Workbook on Rails - Caelum

1

You can configure the plural as you need by changing the file config/initializers/inflections.rb, that will reflect on your entire application. It is worth remembering that Rails is a framework Coc (Convention over Configuration), and the convention is that the code is written in English. This means that the more you code outside the convention, the more settings you will have to make to get the same expected result at the end.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.