メモォーメモォー
def after_sign_in_path_for(resource)
user_path(resource.id)
end
@userにしていたのをresourceにしますたどん
それとアプリケーションコントローラに記述していたのを
レギュレーションコントローラに記述しました。
module ApplicationHelper
def point_comparison(user,target)
return false if user.lucks.blank?
user.lucks.count >= target&.point
end
end
ヘルパーメゾットを使用
ビュー
<% if point_comparison(@user,@terget) %>
これでおっけー^^