Want more GoRails?
GoRails is packed full with 687 lessons just like this one.
Sign up to get full access or log in to your account and sit back.
Your Teacher
Chris Oliver
Hi, I'm Chris. I'm the creator of GoRails, Hatchbox.io and Jumpstart. I spend my time creating tutorials and tools to help Ruby on Rails developers build apps better and faster.
About This Episode
Learn how to add authentication to an RSS feed with Rails and Devise
Notes
Resources
# index.rss.builder
title = "GoRails Screencasts"
author = "Chris Oliver"
description = "GoRails is a series of screencasts and guides for all aspects of Ruby on Rails. Learn how to setup your machine, build a Rails application, and deploy it to a server."
keywords = "rails, ruby on rails, screencasts, programming, refactoring, coding"
image = asset_url("itunes.png")
xml.instruct! :xml, version: "1.0"
xml.rss version: "2.0", "xmlns:itunes" => "http://www.itunes.com/dtds/podcast-1.0.dtd", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.channel do
xml.title title
xml.link episodes_url
xml.description description
xml.language 'en'
xml.pubDate @episodes.first.created_at.to_s(:rfc822)
xml.lastBuildDate @episodes.first.created_at.to_s(:rfc822)
xml.itunes :author, author
xml.itunes :keywords, keywords
xml.itunes :explicit, 'clean'
xml.itunes :image, :href => image
xml.itunes :owner do
xml.itunes :name, author
xml.itunes :email, 'chris@gorails.com'
end
xml.itunes :block, 'no'
xml.itunes :category, text: 'Technology' do
xml.itunes :category, text: 'Software How-To'
end
xml.itunes :category, text: 'Education' do
xml.itunes :category, text: 'Training'
end
@episodes.each do |episode|
xml.item do
xml.title episode.name
xml.summary episode.description
xml.pubDate episode.created_at.to_s(:rfc822)
xml.enclosure url: episode.download_url, length: episode.file_size, type: 'video/mp4'
xml.link episode_url(episode)
xml.guid({isPermaLink: "false"}, episode.slug)
xml.itunes :author, author
xml.itunes :subtitle, truncate(episode.description, length: 150)
xml.itunes :summary, episode.description
xml.itunes :explicit, 'no'
xml.itunes :duration, episode.length
end
end
end
end
Rails Concepts
0% Complete
1
Environment Variables
8m
2
Ruby Version Managers
4m
3
Rails Application Structure
14m
4
The Params Hash
15m
5
Sending Data Between Controllers And Views
5m
6
Querying Named Scopes Across Models with ActiveRecord::Relation#merge
4m
7
Understanding Semantic Versioning
9m
8
A Look Into Routing
9m
9
Forms With Multiple Submit Buttons
10m
Basic Authentication and RSS Feeds
13m
11
Pair Programming on Rails Scopes
1h 3m
12
Rails 5's ActionCable and Websockets Introduction
18m
13
Creating a Railsbyte
29m
14
Rails Counter Caches
21m
15
Atomic Updates And Performance with ActiveRecord Transactions
15m
16
Debugging: How to Interpret a Stacktrace
13m
17
Rails Application Templates
13m
18
Custom Rails Configuration Options
15m
19
ActiveRecord Default Scopes, Unscoped, and Unscope
12m
20
Mail Interceptors & Observers in Rails
7m
21
How to Build Custom ActiveRecord Validations
10m
22
Custom Route Constraints & Regex in Rails
5m
23
Building has_one from has_many Associations
9m
24
Serializing Attributes with Custom Coders
22m
25
ActiveSupport Concerns: Making A Duration Calculation Module
24m
26
The difference between Link_to vs Button_to in Ruby on Rails
14m
27
Understand Scope Returns
28m
28
How Rails.env works with EnvironmentInquirer & StringInquirer
12m
29
Powerful Rails Features You Might Not Know
42m
30
Enhancing the Rails Scaffold Generator with hook_for`
14m
31
ActionController Modules in Rails
3m