lib/artwork/configuration.rb in artwork-0.6.0 vs lib/artwork/configuration.rb in artwork-0.6.1
- old
+ new
@@ -30,9 +30,19 @@
def current_resolution
get(:current_resolution) || default_resolution
end
+ def actual_resolution_for(request)
+ browser_width = request.cookies['_width'].to_i
+
+ if browser_width > 0
+ browser_width
+ else
+ default_resolution
+ end
+ end
+
def current_resolution=(resolution)
set :current_resolution, resolution
end
def configure_for(request)