This file contains 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
- present(attendance).is_attending(attending).is_expired(expired) do |presenter| | |
%li | |
= presenter.name | |
\- | |
= presenter.attends_set_at | |
= presenter.edit_link | |
= presenter.comment |
This file contains 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 Inventory < ActiveRecord::Base | |
belongs_to :user | |
belongs_to :product | |
end |
This file contains 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 Admin < User | |
has_one :user, :as => :userable | |
attr_accessible :user | |
end |
This file contains 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
gallery_timelapse GET /timelapses/:id/gallery(.:format) timelapses#gallery | |
files_timelapse GET /timelapses/:id/files/:year/:month/:day(.:format) timelapses#files | |
timelapses GET /timelapses(.:format) timelapses#index | |
POST /timelapses(.:format) timelapses#create | |
new_timelapse GET /timelapses/new(.:format) timelapses#new | |
edit_timelapse GET /timelapses/:id/edit(.:format) timelapses#edit | |
timelapse GET /timelapses/:id(.:format) timelapses#show | |
PATCH /timelapses/:id(.:format) timelapses#update | |
PUT /timelapses/:id(.:format) timelapses#update | |
DELETE /timelapses/:id(.:format) timelapses#destroy |
This file contains 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 ApplicationController < ActionController::Base | |
def render_error(status, messages) | |
render json: { errors: messages }, status: status.to_sym | |
end | |
def render_not_found | |
render_error :not_found, { base: ['Not found.'] } | |
end | |
end |
This file contains 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 UserPasswordResetsController < ApplicationController | |
#personal preferences here | |
def update | |
user = User.find_by(password_reset_token: params[:id]) | |
if !user.present? | |
head :not_found | |
elsif !(user.is_activated && user.is_active) | |
head :unprocessable_entity | |
elsif user.update_password params[:password], params[:password_confirmation] | |
head :ok |
This file contains 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.upto 15 do |i| | |
j = (1..i).map {10}.reduce(:*) | |
puts j | |
puts "#{helper.distance_of_time_in_words j} || #{helper.distance_of_time_in_words j}" | |
end |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
oldrev=$1 | |
newrev=$2 | |
run() { | |
[ -x $1 ] && $1 $oldrev $newrev | |
} | |
echo files changed: $(git diff $oldrev $newrev --diff-filter=ACDMR --name-only | wc -l) |
This file contains 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 %> |
This file contains 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> |
OlderNewer