20 lines
		
	
	
		
			336 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			336 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| class PagesController < ApplicationController
 | |
|   def index
 | |
|     @pages = Page.last_ten
 | |
|     respond_with @pages
 | |
|   end
 | |
| 
 | |
|   def page
 | |
|     @page = Page.new
 | |
|     person = Person.find(params[:id])
 | |
|     @people = Person.pageable
 | |
| 
 | |
|     return if person.nil?
 | |
|     @page.person_id = person.id
 | |
|     @page.to = person.phone
 | |
|   end
 | |
| 
 | |
|   def send_page
 | |
|   end
 | |
| end
 |