RubyonRailsは初めてです。
アクションでは、エンコードされたコンテンツを含むパーシャルを動的に生成し、data-uriを介してポップアップとして表示する必要があります。
コントローラ
def dashboard
@surprise = get_deal(srand % current_user.dob_year)
end
def get_deal(magic_number)
if magic_number < 500
return "<h5>You have won a voucher #{VoucherFactory.unused_in_the_queue}</h5>"
end
end
今、私:partial=>@surprise
はファイルを保存せずにのようなものが必要です。