This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Show me all available TimeSlots for a Staff member for a Service on a Day | |
| @staff_member.available_time_slots.where( service=1, day=Today ) | |
| # Show me all available TimeSlots for a Service on a Day | |
| @service.available_time_slots.where( day=Today ) | |
| # Show me all available TimeSlots for a Staff member for a Service between 2 Days grouped by Day | |
| @staff_member.available_time_slots.where( service=1, day=>Today, day<=Today+5 ).grouped_by_day() | |
| # Show me all available TimeSlots for a Service between 2 Days grouped by Day |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def create | |
| @article = Article.new(article_params) | |
| @article.save | |
| redirect_to @article | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var x = 42; | |
| var y = "42"; | |
| if (x ===y) { | |
| document.write("x is equal to y with a strict test."); | |
| } else { | |
| document.write("x is not equal to y"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iMac:mysite chris$ cd /Users/chris/Sites/test | |
| iMac:test chris$ sudo python -m SimpleHTTPServer 80 | |
| Password: | |
| Serving HTTP on 0.0.0.0 port 80 ... |