forked from hozaka/rails-bestpractices.com
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
job belongs_to user and add jobs rss
- Loading branch information
Showing
6 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
xml.instruct! | ||
xml.rss(:version => '2.0') do | ||
xml.channel do | ||
xml.title "jobs on rails-bestpractices.com" | ||
xml.link "http://rails-bestpractices.com/jobs" | ||
xml.description 'Post jobs on rails-bestpractices to find good ruby and rails developers' | ||
xml.language 'en-us' | ||
|
||
@jobs.each do |job| | ||
xml.item do | ||
xml.title job.title | ||
xml.description job.description | ||
xml.author job.user.login | ||
xml.pubDate job.created_at | ||
xml.link job_url(job) | ||
xml.guid job_url(job) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AddUserIdToJobs < ActiveRecord::Migration | ||
def self.up | ||
add_column :jobs, :user_id, :integer | ||
end | ||
|
||
def self.down | ||
remove_column :jobs, :user_id | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters