Skip to content
Permalink
Browse files

Params as @instance variables in controllers

  • Loading branch information
ImsirovicAjdin committed Dec 24, 2019
1 parent 470a82a commit 1ecba48f63bfb9d149764a77a36b1ad4311c260a
Showing with 7 additions and 0 deletions.
  1. +1 −0 app/controllers/play_controller.rb
  2. +6 −0 app/views/play/index.html.erb
@@ -1,5 +1,6 @@
class PlayController < ApplicationController
def index
@id = params['id']
end
def home
redirect_to(
@@ -1,2 +1,8 @@
<h1>Play#index</h1>
<p>Find me in app/views/play/index.html.erb</p>
<p>This is the received id:
<%= @id %>
</p>
<p>This is the received di:
<%= params[:id] %>
</p>

0 comments on commit 1ecba48

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