Skip to content
Permalink
Browse files

Passing data from a controller to a view

  • Loading branch information
ImsirovicAjdin committed Dec 24, 2019
1 parent 4f2f6e2 commit c82d2aa52b9076bdeac099e810c4059dd1cf63f1
Showing with 5 additions and 1 deletion.
  1. +1 −0 app/controllers/another_controller.rb
  2. +4 −1 app/views/another/index.html.erb
@@ -1,5 +1,6 @@
class AnotherController < ApplicationController
def index
@greeting = "Good morning"
end

def update
@@ -1,2 +1,5 @@
<h1>AnotherController#index</h1>
<p>Find me in app/views/another/index.html.erb</p>
<p>Find me in app/views/another/index.html.erb</p>
<p>
<%= @greeting %>
</p>

0 comments on commit c82d2aa

Please sign in to comment.
You can’t perform that action at this time.