The asset pipeline is one of Rails' two mechanisms how stylesheets, javascripts and images from your /assets
folder are processed and delivered to the browser. Rails has a second pipeline called webpacker, which we will cover later.
We are we using the BEM pattern ("Block, Element, Modifier") to structure our CSS in all new projects. We try to migrate legacy projects to BEM, block-by-block.
Read the chapter "Taming Stylesheets" from our book Growing Rails Applications in Practice (in our library).
Talk with a colleague about the reasons for the naming conventions we use:
.block
.block--element
.block.-modifier
Why are elements preceded by a...
Stepping forward from JavaScript Basics, the goal of this card is for you to be able to read and write more complex ES6+ and CoffeeScript code, and to migrate code from one language to another.
While we don't use CoffeeScript in new projects any more, we require you to understand it enough to work on existing projects that use it.
Read [The JavaScript Object Model: A deep dive into prototypes and properties](https://makandracards.com/makandra/481040-the-javascript-object-model-a-deep-dive-into-prototypes-and...
Understand how asynchronous JavaScript works:
Just like we use gems on the server, we use third party JavaScript libraries in the browser. These typically provide functionality like:
Take a look at the popular lodash library.
In a web application you often need to move data between the client (HTML, Javascript) and the server (Ruby, Rails).
Add a find-as-you-type search to MovieDB. Above the list of movies there should be a text input that updates the list with the search results as the user is typing in the query. The user should not have to press a "Search" button (hint: you can bind to the [input
](https://makandracards.com/makandra/33699-input-a-dom-event-that-is-fired-whenever-a-text-field-cha...
Read the following Rubymonk articles:
Understand all the terms in How Ruby method lookup works, in particular:
include
extend
prepend
Do you understand why object.extend(SomeModule)
is the same as object.singleton_class.include(SomeModule)
?
How does include
and extend
work together with inheritance?
Understand this article: [Rails 5, Module#prepend, and the End of Alias_method_chain
](https://www.justinweiss.com/ar...
Movies in MovieDB should have one of the following workflow states:
draft
pending
accepted
rejected
A movie always begins as a draft
and then transitions through the states as it's getting reviewed. This could be a typical state flow for a movie:
draft => pending => rejected => pending => accepted
Change the visibility rules (Consul powers) so:
On the Movie DB index, show a random actor who was born today:
Automatically retrieve the year of a movie for any new movie entered into MovieDB, using the themoviedb.org API. For the UI this means that there is no longer a "Year" ...
.png
) and vector images (like .svg
).png
gif
jpg
svg
Browse the internet in order to:
Read Deliver Paperclip attachments to authorized users only. Implement the tasks in this card using similar techniques, even if you are using Carrierwave instead of Paperclip.
Add the following feature to MovieDB:
git diff
and git diff --cached
.git reset
and git reset --hard
add -p
checkout -p
git rebase
.git rebase --onto
.git rebase -i
git commit --amend
do?
Read the following material:
Discuss what you took away with your mentor.
Look at 3 random we...
Many of our clients can't or don't want to design their user interfaces. In the absence of a good UI design, you should always be able to come up with a default. Since the user interface makes up 70% of a typical web application, this is closely related to requirements analysis and cost estimation.
Talk with your mentor about the following topics:
Read the following chapters from our book Growing Rails Applications in Practice:
Discuss each chapter with your mentor.
Talk to your mentor about how we're approaching applications that are either old or adapted from a different team:
bundle && rake db:create db:migrate
)Also have a look at our homepage.