How to render the data from form to controller actions?
This is my controller:-
class ViewController < ApplicationController
def index
end
def new
@txt=params[:txt]
end
end
Index Page:-
New Page:-
View#new
Find me in app/views/view/new.html.erb
Hello <%= @txt %>
<%= link_to 'index','index' %>Error after filling text box and cliking the submit button:-
ActionController::InvalidAuthenticityToken in ViewController#new
ActionController::InvalidAuthenticityToken
RAILS_ROOT: D:/projectNetBean/validation