#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)
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. |
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 |
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. |