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
| # config valid only for Capistrano 3.1 | |
| set :stages, %w(production staging) | |
| set :default_stage, "staging" | |
| set :application, 'aperture' | |
| set :repo_url, 'ssh://repository/git/aperture.git' | |
| set :user, "rails" |
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 BooksController < ApplicationController | |
| before_action :load_book | |
| before_action :check_access | |
| def show | |
| @comments = @book.comments.reversed_nested_set.with_state([:draft, :published]) | |
| end | |
| def subscribed | |
| end | |
| private |
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 JTask | |
| # JTask.find() | |
| # Retrieves records from the database file. | |
| # -------------------------------------------------------------------------------- | |
| # Eg: JTask.find("test.json", 1) || JTask.find("test.json", first: 10) | |
| # #=> <JTask id=x, ...> | |
| # -------------------------------------------------------------------------------- | |
| # See wiki guide for more usage examples... | |
| # https://github.com/adammcarthur/jtask/wiki/find |
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
| <%= form_for Group.new do |f| %> | |
| <table summary = "groups from trainer"> | |
| <tr> | |
| <th><%= f.label(:name) %></th> | |
| <td><%= f.text_field(:name) %></td> | |
| </tr> | |
| <tr> | |
| <th><%= f.label(:area) %></th> | |
| <td><%= f.text_field(:area) %></td> | |
| </tr> |
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 Row | |
| attr_accessor :supervisor_name, :name, :emp_pending, :sup_pending, :approved | |
| def to_s | |
| "Test #{@supervisor_name}, #{@name}, #{@emp_pending}, #{@sup_pending}, #{@approved}, #{total}, #{status}" | |
| end | |
| def total | |
| @emp_pending + @sup_pending + @approved | |
| 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
| class GroupsTrainer < ActiveRecord::Base | |
| attr_accessible :area, :name, :trainer_id | |
| belongs_to :trainer | |
| has_many :home_gardeners | |
| 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
| <strong>Name:</strong> | |
| <%= activity.name %><br/> | |
| <br/> | |
| <%= image_tag(activity.image_url, :size => '250x250') %> | |
| <br/> | |
| <strong>Location</strong> | |
| <%= activity.location %><br/> | |
| <strong>Duration:</strong><br/> | |
| <%= activity.start_date %><br/> | |
| <%= activity.end_date %><br/> |
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
| --- !ruby/hash:ActionController::Parameters | |
| id: e6249bf8-562a-48ed-8a0e-0b5c89a96409 | |
| mini_story_attributes: !ruby/hash:ActiveSupport::HashWithIndifferentAccess | |
| id: a43fa828-345a-43c1-9d54-86ea5e8e8212 | |
| name: Empty MS | |
| generic_function_views_attributes: | |
| sequential_execution_views_attributes: | |
| delayed_selection_views_attributes: | |
| simple_merge_views_attributes: | |
| exclusive_selection_views_attributes: |
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> | |
| <% @users.each do |user| %> | |
| <li> | |
| <%= link_to("1. Letter of Representation", letter_of_user_path(user) %> | |
| </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
| def show | |
| @video = Video.find(params[:id]) | |
| @related = @video.find_related_tags.limit(4) | |
| end | |
| ===== | |
| <h4>Similar videos:</h4> | |
| <ul class="large-block-grid-4 small-block-grid-2 medium-block-grid-3"> | |
| <%= @related.size %> |