Main Content:
15 Rails 101: File Structure 0 comments
13 Rails 101: Introduction 1 comment
I'd like to introduce my new series of screencasts called "Rails 101", I realised that while Rails is really taking off, many people are put off by the lack of comprehensive beginner screencasts and the need to shell out masses of money on expensive books.
While these screencasts will be aimed at beginners, I'd hope that more advanced Rails developers will find them useful to fill gaps in their knowledge. Alongside the videos there will also be a transcript so if you don't have the bandwidth or environment to watch videos, you have an alternative.
Download Screencast: Mirror 1 | Mirror 2 | iPhone Size: 9.8mb, Time: 03:37
10 YAML Configuration Files 0 comments
I've got a useful, quick tip for you this week. Loading in a configuration file can be really handy when you have a few settings that might change in the future of your application, such as contact email addresses or the strength of a spam filter.
Download Screencast: Mirror 1 | Mirror 2 | iPhone Size: 13mb, Time: 01:43
7 Polymorphic Permissions 4 comments
5 Spam Filtering 6 comments
With so many public-facing, interactive websites these days everyone is doing their best to combat spam. Being that I am a perfectionist, I hate relying upon external services (such as Akismet) if at all possible, so to protect ThinkRefresh from spam I coded a custom spam filter, which may be advanced, but is pretty simple to implement.
Download Screencast: Mirror 1 | Mirror 2 | iPhone Size: 38.7mb, Time: 05:54
4 Proactive Logging 2 comments
The log is an essential tool for all Rails developers, both for development and production environments. There are a few problems with the log though, such as not splitting it's files up, and requiring the developer to actively go looking for problems within it, in this screencast I address both of these issues.
Download Screencast: Mirror 1 | Mirror 2 | iPhone Size: 52.1mb, Time: 07:58
3 Verified Degradable Deletion 2 comments
I use scaffold for the basis of all my applications at the moment, it provides a sturdy starting point that you can easily build upon, but there are a few issues that need to be solved before getting started, the first of which is deletion.
Download Screencast: Mirror 1 | Mirror 2 | iPhone Size: 32.0mb, Time: 05:10
2 Block Helper Methods 3 comments
You may have used helper methods before to streamline the code in your views, and you may have even used block helpers, to further improve your refactoring, but probably not block helpers with their own methods. This technique is how text_field :product, :name became f.text_field :name.
Download Screencast: Mirror 1 | Mirror 2 | iPhone Size: 40.9mb, Time: 09:38
1 Automated Client-Side Validation 9 comments
Having to write separate JavaScript to validate user input before submission of forms can be a right pain, not only is it not very DRY, but it wastes time. Using AJAX you can cheat, harnessing the server-side Rails validation you have already written.
Download Screencast: Mirror 1 | Mirror 2 | iPhone Size: 47.5mb, Time: 12:24