Created
September 4, 2008 16:10
-
-
Save laktek/8799 to your computer and use it in GitHub Desktop.
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
make_resourceful do | |
actions :all | |
before :show do | |
@articles = current_object.articles | |
end | |
before :index do | |
@books = AmazonService::get('0QZ1AAT31TZ9RNVANY82', 'hackruby-20', 'ruby programming') unless read_fragment(:fragment => 'books') | |
@videos = YoutubeService::get('E45845C8A1F5726D', 3) unless read_fragment(:fragment => 'videos') | |
@ruby_links = DeliciousService::get unless read_fragment(:fragment => 'ruby_links') | |
end | |
response_for :create, :update do |format| | |
format.html do | |
expire_page :action => 'show' | |
set_default_flash(:notice, "Changes successful!") | |
set_default_redirect category_path(current_object.url_param) | |
end | |
end | |
response_for :show do |format| | |
format.html | |
format.rss {render :layout => false} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment