Skip to content

Instantly share code, notes, and snippets.

@sigra
Last active May 24, 2016 15:38
Show Gist options
  • Save sigra/0d1d04d8ae720608e46edbe40df2070c to your computer and use it in GitHub Desktop.
Save sigra/0d1d04d8ae720608e46edbe40df2070c to your computer and use it in GitHub Desktop.
Hotspot::Page.where(page_type: 'Advertising').find_each do |row|
button_type = case row.redirect_text
when nil, '' then 'full_screen'
when 'верх' then 'top_screen'
when 'центр' then 'middle_screen'
when 'низ' then 'bottom_screen'
else 'button_screen'
end
row.update_columns(redirect_text: '', button_type: button_type)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment