When i'm trying to get my QR-Code for the users to work I'm always getting this error message:
undefined method `dark?' for #
I'm not sure why this happens, I did everything like mentioned and in my controller I require the gem like: require 'rqrcode'
Then I'm trying to generate the QR-Code for 2-Factor-Authentication:
@qr = RQRCode::QRCode.new(@user.provisioning_uri, :size => 8, :level => :h )
And in my view:
<table class="qr">
<% @qr.modules.each_index do |x| %>
<tr>
<% @qr.modules.each_index do |y| %>
<% if @qr.dark?(x,y) %>
<td class="black">
<% else %>
<td class="white">
<% end %>
<% end %>
</tr>
<% end %>
</table>
When i'm trying to get my QR-Code for the users to work I'm always getting this error message:
undefined method `dark?' for #
I'm not sure why this happens, I did everything like mentioned and in my controller I require the gem like: require 'rqrcode'
Then I'm trying to generate the QR-Code for 2-Factor-Authentication:
@qr = RQRCode::QRCode.new(@user.provisioning_uri, :size => 8, :level => :h )
And in my view:Any suggestions?