Я пытаюсь отобразить шаблон, нажав на ссылку.визуализировать шаблон с link_to rails 3.1
Вот что я делаю: -
link_to "Profile", render :template => "profile"
Это дает мне ошибку: -
SyntaxError in Settings#account_setting
Вот мой контроллер настройки: -
class SettingsController < ApplicationController
before_filter :authenticate_user!
def profile
@user = current_user
request.method.inspect
if request.method == "POST"
@user.update_attributes(params[:user])
flash[:notice] = "You updated your profile successfully."
end
end
def account_setting
end
end
Это ошибка: -
syntax error, unexpected tSYMBEG, expecting keyword_do or '{' or '(' on this line %li=link_to"profile", render :template => "profile"
Это генерируемый разметки ошибки: -
syntax error, unexpected tSYMBEG, expecting keyword_do or '{' or '(' ...se((link_to("profile", render :template => "profile"
Что может быть проблема?
Что это за частичная? Покажи это. –
@SergioTulentsev обновил ошибку –
Вы хотите сделать это, не перезагружая страницу? –