Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4228

Show
Ignore:
Timestamp:
04/18/06 05:36:37 (2 years ago)
Author:
david
Message:

More work later

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • applications/molecule/app/controllers/entries_controller.rb

    r4227 r4228  
    1616  def create 
    1717    @entry = @workspace.entries.create(params[:entry]) 
     18     
     19    respond_to do |type| 
     20      type.js 
     21      type.atom do 
     22        headers["Location"] = entry_url(:id => @entry) 
     23        render :nothing => true, :status => "201 Created" 
     24      end 
     25    end 
    1826  end 
    1927   
  • applications/molecule/app/models/entry.rb

    r4227 r4228  
    11class Entry < ActiveRecord::Base 
    22  belongs_to :workspace 
     3   
     4  def updated=(time) 
     5    self.updated_at = time 
     6  end 
    37   
    48  def summary 
  • applications/molecule/config/environment.rb

    r4219 r4228  
    2222end 
    2323 
     24ActionController::Base.param_parsers[Mime::ATOM] = :xml_simple 
     25 
    2426# Add new inflection rules using the following format  
    2527# (all these examples are active by default):