简体   繁体   中英

the controller doesn't work

Hi everyone at this time I created a new controller, view and helper called Menuprestacionessociales

I have all the files as I think it should be

menuprestacionessociales_controller.rb

class MenuprestacionessocialesController < ApplicationController
    def index
        @variable = "cualquier contenido"
    end
end

menuprestacionessociales/index.html.erb

<%= @variable %>

So I have a simple variable in my controller called @variable but if I try to show the content in the index, it doesn't show anything

<%= @variable %>放在index.html.erb文件中的某个位置。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM