Ruby/Rails - Models Named with Two Words (Naming Convention Issues)

后端 未结 4 737
青春惊慌失措
青春惊慌失措 2020-12-23 16:44

This is really a question about naming conventions.

I have a model called PromotedEvents

The file is called promoted_events.rb

I created the table wi

4条回答
  •  -上瘾入骨i
    2020-12-23 17:39

    Your class should be singlular.

    Name it PromotedEvent in the file promoted_event.rb

    a = PromotedEvent.new
    

提交回复
热议问题