Changeset 1272
- Timestamp:
- 01/10/08 13:59:04 (9 months ago)
- Files:
-
- mrblog/branches/0.4.2/app/controllers/files.rb (modified) (1 diff)
- mrblog/branches/0.4.2/app/views/files/progress.js.erb (moved) (moved from mrblog/branches/0.4.2/app/views/files/progress.jerb)
- mrblog/branches/0.4.2/app/views/files/start.html.erb (modified) (1 diff)
- mrblog/branches/0.4.2/spec/models/user_spec.rb (modified) (1 diff)
- mrblog/branches/0.4.2/spec/spec_helper.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mrblog/branches/0.4.2/app/controllers/files.rb
r1203 r1272 11 11 12 12 def upload 13 FileUtils.mv(params[:data][:tempfile].path, 14 Merb::Server.config[:merb_root]+"/public/files/#{params[:data][:filename]}") 15 render_no_layout 13 # for testing check your terminal 14 puts "---------------------" 15 puts params.inspect 16 puts "---------------------" 17 # move 18 destination = MERB_ROOT + "/public/uploads/#{params[:file][:filename]}" 19 FileUtils.mv(params[:file][:tempfile].path, destination) 20 render 16 21 end 17 22 mrblog/branches/0.4.2/app/views/files/start.html.erb
r1203 r1272 38 38 <dl> 39 39 <dt><label>Select a file</label></dt> 40 <dd><input name=" data" type="file" /></dd>40 <dd><input name="file" type="file" /></dd> 41 41 </dl> 42 43 42 44 43 <p> mrblog/branches/0.4.2/spec/models/user_spec.rb
r1236 r1272 3 3 4 4 describe User, "being authenticated" do 5 include TestData 5 6 6 7 before(:each) do 7 User.delete_all 8 @fred = User.create( 9 :first_name => 'Fred', 10 :last_name => 'Smith', 11 :login => 'fsmith', 12 :email => 'fred@smith.com', 13 :password => 'secret', 14 :password_confirmation => 'secret', 15 :created_at => "'#{1.days.ago}'") 8 testdata_user 16 9 end 17 10 mrblog/branches/0.4.2/spec/spec_helper.rb
r1203 r1272 8 8 9 9 Spec::Runner.configure do |config| 10 config.include(Merb::Test::Helper)11 config.include(Merb::Test::RspecMatchers)10 config.include(Merb::Test::Helper) 11 config.include(Merb::Test::RspecMatchers) 12 12 end 13 13 14 require File.join(File.dirname(__FILE__), 'testdata') 14 15 15 16 ### METHODS BELOW THIS LINE SHOULD BE EXTRACTED TO MERB ITSELF
