mirror of
				https://github.com/fspc/bike-database.git
				synced 2025-10-31 08:45:34 -04:00 
			
		
		
		
	WIP | Louis | Adding client receipts
This commit is contained in:
		
							parent
							
								
									9fad8ded1b
								
							
						
					
					
						commit
						67ae0bf04b
					
				
							
								
								
									
										1
									
								
								Gemfile
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								Gemfile
									
									
									
									
									
								
							| @ -23,6 +23,7 @@ group :test, :development do | ||||
|   gem 'pry-rails' | ||||
|   gem 'better_errors' | ||||
|   gem 'assert_difference' | ||||
|   gem 'binding_of_caller' | ||||
| 
 | ||||
|   # Uncomment this line on OS X. | ||||
|   gem 'growl', '1.0.3' | ||||
|  | ||||
| @ -33,6 +33,8 @@ GEM | ||||
|     better_errors (1.1.0) | ||||
|       coderay (>= 1.0.0) | ||||
|       erubis (>= 2.6.6) | ||||
|     binding_of_caller (0.7.2) | ||||
|       debug_inspector (>= 0.0.1) | ||||
|     bootstrap-sass (2.3.2.0) | ||||
|       sass (~> 3.2) | ||||
|     builder (3.1.4) | ||||
| @ -52,6 +54,7 @@ GEM | ||||
|       coffee-script-source | ||||
|       execjs | ||||
|     coffee-script-source (1.6.3) | ||||
|     debug_inspector (0.0.2) | ||||
|     devise (3.2.4) | ||||
|       bcrypt (~> 3.0) | ||||
|       orm_adapter (~> 0.1) | ||||
| @ -192,6 +195,7 @@ DEPENDENCIES | ||||
|   assert_difference | ||||
|   bcrypt-ruby (= 3.1.2) | ||||
|   better_errors | ||||
|   binding_of_caller | ||||
|   bootstrap-sass (= 2.3.2.0) | ||||
|   capybara (= 2.1.0) | ||||
|   devise | ||||
|  | ||||
| @ -19,22 +19,18 @@ class ClientsController < ApplicationController | ||||
| 
 | ||||
|   def create | ||||
|     @client = Client.new(client_params) | ||||
|     respond_to do |format| | ||||
|       if @client.save | ||||
|         format.html { redirect_to @client, notice: 'Client was successfully created.' } | ||||
|       else | ||||
|         format.html { render action: 'new' } | ||||
|       end | ||||
|     if @client.save | ||||
|       redirect_to @client, notice: 'Client was successfully created.' | ||||
|     else | ||||
|       render action: 'new'  | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   def update | ||||
|     respond_to do |format| | ||||
|       if @client.update(client_params) | ||||
|         format.html { redirect_to @client, notice: 'Client was successfully updated.' } | ||||
|       else | ||||
|         format.html { render action: 'edit' } | ||||
|       end | ||||
|     if @client.update(client_params) | ||||
|       redirect_to @client, notice: 'Client was successfully updated.' | ||||
|     else | ||||
|       render action: 'edit' | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|  | ||||
| @ -13,4 +13,8 @@ class FreecycleryController < ApplicationController | ||||
|     @available_bikes = Bike.available_for_freecyclery | ||||
|   end | ||||
| 
 | ||||
|   def receipt | ||||
|     @client = Client.find(params[:client_id]) | ||||
|   end | ||||
| 
 | ||||
| end | ||||
|  | ||||
							
								
								
									
										1
									
								
								app/views/freecyclery/receipt.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								app/views/freecyclery/receipt.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| KITTENS | ||||
| @ -11,7 +11,9 @@ Bikedb::Application.routes.draw do | ||||
| 
 | ||||
|   resources :volunteers | ||||
|   resources :agencies | ||||
|   resources :clients | ||||
|   resources :clients do | ||||
|     get 'receipt' => 'freecyclery#receipt' | ||||
|   end | ||||
| 
 | ||||
|   get 'closed_applications' => 'freecyclery#closed_applications' | ||||
|   get 'ready_for_pickup' => 'freecyclery#ready_for_pickup' | ||||
|  | ||||
| @ -9,6 +9,7 @@ Reports | ||||
|    Number of bikes donated according to agency. (Graph?) | ||||
|    Average bike price for year. | ||||
| 
 | ||||
| 
 | ||||
| assign a bike from the available freecyclery bikes page | ||||
| mark as picked up from the ready for pickup page | ||||
| validations around parameters that break site if incomplete | ||||
| @ -24,4 +25,7 @@ refactor index - move unsold bikes to model | ||||
| make ‚recyclery‘ its own view folder, controller, etc. | ||||
| add a request-a-feature feature | ||||
| 
 | ||||
| add pics of bikes for sale | ||||
| add recyclery logos & bike memorabilia pics all over app | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user