Guest User

Untitled

a guest
Feb 20th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. unless @city.schools.empty?
  2. display = :find_school
  3. page.hide :find_school_error, :suggest_school
  4.  
  5. page << update_select_box('school_school', @city.schools, { :text => :name })
  6.  
  7. page.replace_html 'suggest_school', "<strong>Don't see your school here?</strong> Sorry about that! Our database is still growing, so please take a moment to " + link_to('suggest it', :controller => 'school', :action => 'suggest', :city_id => @city.id) + '! School suggestions are usually reviewed within 24 hours and only take a minute to submit!'
  8. else
  9. display = :find_school_error
  10. page.hide :find_school
  11.  
  12. page.replace_html 'find_school_error', "Sorry, but the we do not have any schools in our database for that city yet. To get started, simply head on over to the <strong>" + link_to('suggest school', :controller => 'school', :action => 'suggest', :city_id => @city.id) + "</strong> page and submit your school. It only takes a moment, and your school's new homepage will be up and running in no time!"
  13. end
  14.  
  15. page.visual_effect :appear, display
  16.  
  17. page.visual_effect :highlight, display,
  18. :duration => 2
Add Comment
Please, Sign In to add comment