Newsfeed

How to manually execute a SQL query in Ruby on Rails

I run into this just now. The wrong way: 

results = ActiveRecord::Base.connection.execute("select * from users limit 10")

The right way: 

results = ActiveRecord::Base.connection.exec_query("select * from users limit 10") 

Somehow the formet executes the query without returning a result. If you want to actually see the results of SELECT'ing something, use the latter query. (Which also means that you probably want to use the former for INSERT'ing, though I have not verified.)

Is HP Smart Tank 520 compatible with mac os?

The short answer is no. The box says, not compatible. Online on the HP website, you can download drivers that are supposedly for mac. But on my mac 12.5 Monterey, I was still unable to print from this multi-printer. 

I was able to print from a windows laptop however, using the same printer. So to me it seems that the HP 520 really isn't compatible with macs. 

Teaser Text

No.