#Loading Login Page without Any Library ###Rails Logs
Completed 200 OK in 27.0ms (Views: 22.6ms | ActiveRecord: 0.0ms)
Completed 200 OK in 35.1ms (Views: 29.0ms | ActiveRecord: 0.0ms)
Completed 200 OK in 25.6ms (Views: 21.3ms | ActiveRecord: 0.0ms)
1. The data is store in table which have an unique identifier, usually call primary id, | |
also it is posible to create relathionship between tables through this primary key. | |
2. SQL(Structured Query Language) is the language to acces the tables in our databases to | |
insert, extract, delete or update. | |
3. There are Data and Schema, schema is a way to represent the different tables in our DataBase | |
what type of data and the name of the columns. And Data show the data, inside the tables, | |
every Database has it own schema. | |
4. Primary Key | |
5. A foreign Key is an identifier inside of a table that refers to another table. | |
6. ActiveRecord connects the rich objects of an application to tables in a relational database management. |
require 'spec_helper' | |
describe ReviewsController do | |
before(:each) do | |
signin_user | |
@video = Fabricate(:video) | |
end | |
describe 'Post Create' do | |
context 'Authenticated user Valid data' do | |
it 'create a new review with valid data' do |
Write a model (ActiveRecord-based) for storing global configuration settings. It will be used for storing single values, for example an email address to send error emails to, or a flag enable/disable a particular feature. The interface must be simple and convenient, it should be possible to read and write specific configuration items. It must be possible to store values of these 4 types: string, integer, float and boolean. The model should come with a unit test and a migration. | |
Bonus: add caching within the model so that values are cached in regular Rails cache to minimize db load. | |
Please include a quick summary of use and commentary regarding any design decisions. Please indicate how long you spent working on this. |
## Plugins | |
1. curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
2. cd ~/.vim/bundle && git clone https://github.com/scrooloose/nerdtree.git | |
3. cd ~/.vim/bundle && git clone https://github.com/kien/ctrlp.vim.git | |
4. cd ~/.vim/bundle && git clone git://github.com/tpope/vim-fugitive.git | |
5. cd ~/.vim/bundle && git clone [email protected]:altercation/vim-colors-solarized.git | |
* * * |
module AliasClass | |
def self.included(base_class) | |
base_class.class_eval do | |
def self.alias_class(original_class, new_class) | |
self.const_set(new_class, original_class) | |
end | |
end | |
end | |
end |
module Hybridflow | |
class CRMMessageParser | |
class Clipboard | |
attr_reader :message, :context, :error_handler | |
def self.car_rental_providers | |
providers = Pathify::CarProvider.all.map{ |p| p.name.try(:downcase).try(:strip) }.compact | |
providers.empty? ? _car_rental_providers : providers | |
rescue | |
_car_rental_providers |
defmodule Flatten do | |
def flat(list) do | |
cond do | |
is_list(list) -> flat(list, []) |> Enum.reverse | |
true -> {:error, "Must pass a List"} | |
end | |
end | |
def flat([], acc), do: acc |