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
| @shift_groups = @shifts.group_by(&:date).to_a.sort | |
| 2012-02-06 | |
| #<Shift:0x00000004b3f868> | |
| 2012-02-07 | |
| #<Shift:0x00000004a59b60> | |
| #<Shift:0x00000004a59200> | |
| #<Shift:0x00000004a58738> | |
| 2012-02-08 | |
| #<Shift:0x00000004a57db0> |
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
| ______________________________________________ | |
| Link to Action in View: | |
| ______________________________________________ | |
| <%= link_to image_tag("refreshIcon.png"), replace_meal_queue_recipe_path(meal_queue_recipe), method: :post, remote: true %> | |
| ______________________________________________ | |
| Controller: | |
| ______________________________________________ | |
| class MealQueueRecipesController < ApplicationController | |
| # GET /meal_queue_recipes |
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
| 1: <ul> | |
| 2: <% Student.search("Jamie").each do |student| %> | |
| 3: <li><%= link_to Student.student_name, | |
| 4: :action => 'show', :id => Student.id %></li> | |
| 5: <td><%=h student.student_name %></td> |
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
| class Student < ActiveRecord::Base | |
| def self.search(query) | |
| find(:all, :conditions => ['student_name LIKE ?', "%#{query}%"]) || [] | |
| end | |
| 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
| $ -> | |
| $(document).on 'click', '.sf-close a', -> | |
| $(this).parent().parent().hide() |
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
| x = if y == 2 then 3 else 4 |
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
| class Foo | |
| include HTTParty | |
| parser Proc.new {|data| ...} | |
| 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
| development: | |
| adapter: mysql | |
| host: localhost | |
| database: depot_development | |
| username: root | |
| password: root |
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
| <ul> | |
| <% zombies.each do |zombie| %> | |
| <li> | |
| <%= zombie.name %> | |
| <% if zombie.tweets.count > 1 %> | |
| SMART ZOMBIE | |
| <% end %> | |
| </li> | |
| <% end %> | |
| </ul> |
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
| <% zombies.each do |zombie| %> | |
| <li><%= zombie.name %></li> | |
| <% end %> |