adorable-france-99527
07/20/2023, 8:44 PMhttps://cdn.discordapp.com/attachments/740893011994738751/1131688167720894494/Screen_Shot_2023-07-20_at_4.43.20_PM.png▾
lemon-wall-20836
07/21/2023, 1:43 PMlemon-wall-20836
07/21/2023, 1:50 PMlemon-wall-20836
07/21/2023, 1:50 PMrails g model m_s_a
lemon-wall-20836
07/21/2023, 1:50 PMadorable-france-99527
07/21/2023, 2:23 PMMSA
(msa.rb
) and our avo controller is MSAsController
(or msas_controller.rb
), and our inflections file contains ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym "MSA"
inflect.acronym "MSAs"
end
adorable-france-99527
07/21/2023, 2:39 PM.humanize
here (which is a Rails method which uses inflection) vs .capitalize
which is a Ruby method which just dumbly capitalizes the first letter of the word.adorable-france-99527
07/21/2023, 2:39 PMirb(main):106:0> "msa".capitalize
=> "Msa"
irb(main):107:0> "msa".humanize
=> "MSA"
irb(main):108:0> "MSA".capitalize
=> "Msa"
adorable-france-99527
07/21/2023, 2:40 PMlemon-wall-20836
07/21/2023, 2:42 PMlemon-wall-20836
07/21/2023, 2:42 PMadorable-france-99527
07/21/2023, 2:43 PMadorable-france-99527
07/21/2023, 2:53 PM