Via IRB in terminal example developer works fine.
But can not figure out how to use it in the application.
In the model, controller or view?
The problem is this:
You need to load different scripts for different devices.
Please tell me how to implement.
request.headers['User-Agent'] - works only in the view. As the same register in the model?
user_agent = request.headers['User-Agent']
client = DeviceDetector.new(user_agent)
Continue using the condition
if client.device_type == 'smartphone'
What delayy wrong?