title: Confused about Rails MVC: Why can the view invoke model-methods?
body: <p>I got this Model-method:</p>
  
  <pre><code>class Post &lt; ApplicationRecord
      def details
          "This post was created on #{created_at.strftime("%d %M %Y")}"
      end
  end
  </code></pre>
  
  <p>In the controller: I create a variable which has the return-value of the method.</p>
  
  <pre><code>def show
      @test = @post.details
  end
  </code></pre>
  
  <p>In the view I display the value of the variable 'test' (first paragraph).</p>
  
  <pre><code>&lt;p&gt;
    &lt;%= @test %&gt;
  &lt;/p&gt;
  
  &lt;p&gt;
    &lt;%= @post.details %&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>But moreover: <strong>I can invoke the model-method directly from the view.</strong> Second paragraph ...</p>
  
  <p>That really confuses me, because I thought that wouldn't be possible at all.</p>
  
  <p>I thought that only the controller can invoke the model-methods and that it (the controller) creates the variables, which are then available within the view ... So that the model and view are separated and decoupled.</p>
  
  <p>But they way it is (obviously), the model and view would become merged together anyway. </p>
  
  <p><strong>What sense makes the controller at all, when the view can invoke model-methods itself?</strong></p>