BootRails
29 FOLLOWERS
Blog posts contain all of the information you need to get started with Ruby-on-Rails. Authored by David Boureau, a web developer based in Paris, France.
BootRails
5M ago
Intro : bloated data Displaying bulk of data in a single page is not a good practice because it slows down our rails application and will decrease the performance of the database server. Displaying long lists has a significant performance impact on both front-end and back-end: First, the database reads a lot of data from disk. Second, the result of the query is converted to ..read more
BootRails
5M ago
This is an opinionated article about ERB and HAML with Rails. Let’s compare each other and pick a winner. Use case In the Ruby-on-Rails world, they are known as templating languages. In the MVC concept, they represent “the View”. Both are here to output HTML. Example Examples worth a thousand words, so here are two examples, one with ERB, the other with HAML. Both are strictly equivalent. I ..read more
BootRails
5M ago
Authorization means give or refuse access to the current User to some URLs (or more generally, any kind of resource.) It’s closely bound to Authentication, but it’s different. Think about an international conference about climate change. Authentication is the entrance ticket, you can not enter the conference without the ticket. Authorization is about checking the ticket levels of access : d ..read more
BootRails
5M ago
Use the filter or select method Like JavaScript, you can choose to .filter an Array Ruby version ary = ['abc', 'bzz', 'aaa'] ary.filter{|e| e.include?('a')} # ['abc', 'aaa'] JS version let ary = ['abc', 'bzz', 'aaa'] ary.filter((e) => e.includes('a')) // ['abc', 'aaa'] Pretty similar right ? Side note : When manipulating String, I find the .include? (Ruby) and .includes (JS) meth ..read more
BootRails
5M ago
Intro I once had a conversation with an American at breakfast. He was eating a fresh French baguette, and seemed to be worried… his question finally was : Why is that so good? Why Americans do not make such kinds of bread was (for him) a mystery. Some cultural gap I guess? Now let’s go back to the Rails community. If Rails is so incredible (which is true) with such a strong and v ..read more
BootRails
3y ago
More often than not, you have to check if an object is empty. But what does "empty" means exactly ..read more
BootRails
3y ago
Customise Bootstrap with Rails is not very complicated : Bootstrap v5 opened wide the doors (and variables file) to make it easy ..read more
BootRails
3y ago
More often than not, you have to check if an object is empty. But what does "empty" means exactly ..read more
BootRails
3y ago
Private methods exist for a reason. However they can lead to tricky situations. Here is a quick hack about private methods in Ruby ..read more