Because of being invited to take part in a Rails Girls event, I created two presentations. Both of them are intended to be used as short introductions (to Ruby and Git, respectively).
Take a look if you'd like to use them to train other beginners, possibly at an another Rails Girls event.
If you don't know what is a sitemap, I strongly encourage you to fill this gap in knowledge first and then get back to reading.
It seems to be clear that manual updating a sitemap can turn into a horror. Hopefully we can make the Rails do the job for us. We are going to need a separate action, an XML view and model methods to provide us with URL data. You can read here how to put all these things together.
Sometimes we want part of the website to be available to specific users only. Either we don't want our users to interact with a piece of functionality we are still working on or we want to show the new function to our client first, before making it available to the public. In both cases, we can't let a single unwanted user to slip through our fingers.
HTTP basic authentication is the most simple way to achieve this and we're going to show how it can be used in Rails. It's really simple!
Rails ActiveRecord is a quite useful piece of software, though it lacks some features and way of achieving the desired result is not always obvious.
Let's assume that we have two tables in our database: categories and posts. We would like to get most essential categories; i.e. those having at least 10 posts assigned to them. We can achieve this using the SQL JOIN, GROUP BY and HAVING clauses. However, there is no :having parameter on the find() method's parameter list.
Let's take a look at a simple workaround.