- App's use cases
- Wireframes of the UI
- Technical diagrams
- Active Record Query Interface (http://guides.rubyonrails.org/active_record_querying.html), concretely:
- Finding elements
- Where
- Relations
- Scopes
- CRUD
- Extra Active Record articles:
- (http://guides.rubyonrails.org/migrations.html)
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 EnglishStudentsController < ApplicationController | |
def update | |
@english_student = User.find(params[:id]) | |
respond_to do |format| | |
if @english_student.update_attributes(english_student_params) | |
format.json { render json: { message: "Student updated successfuly" } } | |
else | |
format.json { render json: { message: "Student could not be updated" } } | |
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
SELECT | |
'DROP TABLE '||c.relname ||' CASCADE;' | |
FROM pg_catalog.pg_class c | |
JOIN pg_catalog.pg_roles r ON r.oid = c.relowner | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace | |
WHERE c.relkind IN ('r','') | |
AND n.nspname NOT IN ('pg_catalog', 'pg_toast') | |
AND pg_catalog.pg_table_is_visible(c.oid) | |
ORDER BY 1; |
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
User.where(signed_up_at: nil).each do |user| | |
if user.oauth_token.present? then | |
user.signed_up_at = user.updated_at | |
user.save | |
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
require 'delayed_job' | |
namespace :content do | |
desc "Generates the bouquet template images" | |
task :generate_bouquet_template_images => :environment do | |
puts ">>>>>>>>>>>>>>>>>>>>>> Creating (or recreating) the bouquet template image versions" | |
handle_asynchronously :recreate_bouquet_template_main_images | |
end | |
def recreate_bouquet_template_main_images |
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
// It was happening when the options weren't having description, so the plugin gets inside this function and for some reason looks like the l0Height variable gets incremented (when it shouldn't). | |
// The fix for me was to put the line-height as constant with the: | |
// var lOHeight = '35px'; | |
// line. | |
//Private: Adjust appearence for drop down options (move title to middle), when no desripction | |
function adjustOptionsHeight(obj) { | |
obj.find('.dd-option').each(function () { |
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
# encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
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
.player | |
.headerAndLibraryW | |
%header | |
%ul | |
%li | |
%a{ href:'' } Library | |
%a{ href:'' } Playlist | |
%a{ href:'' } Sign out | |
%form{ } | |
%input{ type:'text', value:'Search' } |
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
@javascript | |
Scenario: Returning to a form placement # features/collection.feature:12 | |
When a contact returns to a form placement completed previously # features/step_definitions/engine_steps.rb:132 | |
Unable to load URL: http://api.lvh.me:4433/placements/test (Capybara::Driver::Webkit::WebkitInvalidResponseError) | |
./features/step_definitions/engine_steps.rb:29:in `/^a contact visits a page with an? (\w+) placement$/' | |
features/collection.feature:13:in `When a contact returns to a form placement completed previously' |