Dan Bradbury
Dan Bradbury

Reputation: 2116

Reason behind a method defined to explicitly access model

I just ran across this code while resolving some merge conflicts and am having a tough time understanding the justification for doing something like this.

Can anyone tell me if there is a good reason for having a method defined to access the model explicitly.

private
def message_class
  CustomerMessage
end

def lookup_message_class
  CustomerMessage
end

Hopefully i am just misunderstanding something, because this is done multiple times by a coworker.

Upvotes: 0

Views: 47

Answers (1)

No point of doing that.

If you want to change the class afterward, change it everywhere.

Upvotes: 1

Related Questions