Skip to content

Commit

Permalink
update to rails 2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron2Ti committed Mar 21, 2009
1 parent af4a0f0 commit 0a207dc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Expand Up @@ -5,10 +5,10 @@ def new
end

def create
User.create!(params[:user])
@user = User.new(params[:user])
@user.save!
redirect_to account_url
rescue
@user = User.new
render :action => :new
end

Expand Down
4 changes: 2 additions & 2 deletions app/views/parts/new.html.haml
Expand Up @@ -5,8 +5,8 @@
.upload-part
- form_for @part, :html => {:multipart => true} do |f|
.field
= f.label :desc, '名称'
= f.text_field :desc
= f.label :name, '名称'
= f.text_field :name
.field
= f.label :upload_file, '选择图纸'
= f.file_field :upload_file
Expand Down
3 changes: 3 additions & 0 deletions app/views/users/new.html.haml
Expand Up @@ -4,6 +4,9 @@
.field
= f.label :login, '用户名:'
= f.text_field :login
.field
= f.label :login, 'E-mail:'
= f.text_field :email
.field
= f.label :password, '密码:'
= f.password_field :password
Expand Down
6 changes: 4 additions & 2 deletions config/environment.rb
@@ -1,6 +1,6 @@
#APP_ROOT = 'E:/workspace/pps'

RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION

require File.join(File.dirname(__FILE__), 'boot')

Expand All @@ -15,7 +15,7 @@
# use numeric prefix migration name conventions
config.active_record.timestamped_migrations = false

config.gem 'haml', :version => '>= 2.0.4'
config.gem 'haml', :version => '>= 2.0.9'
config.gem 'authlogic', :version => '>= 1.4.3'
config.gem 'mini_magick', :version => '>= 1.2.3'
config.gem 'sqlite3-ruby', :lib => 'sqlite3'
Expand All @@ -25,3 +25,5 @@
# ? 'application/octet-stream'
# SolidWorks Part's MimeType is 'application/presentations' or 'image/x-presentations'
Mime::Type.register 'application/octet-stream', :sldprt
ActionView::Helpers::InstanceTag.const_set(:DEFAULT_FIELD_OPTIONS, {})
ActionView::Helpers::InstanceTag.const_set(:DEFAULT_TEXT_AREA_OPTIONS, {:rows => 5})
16 changes: 8 additions & 8 deletions config/preinitializer.rb
@@ -1,9 +1,9 @@
# overwite the defaults text_field options
module ActionView
module Helpers
class InstanceTag
DEFAULT_FIELD_OPTIONS = {}
DEFAULT_TEXT_AREA_OPTIONS = {:rows => 5}
end
end
end
#module ActionView
# module Helpers
# class InstanceTag
# DEFAULT_FIELD_OPTIONS = {}
# DEFAULT_TEXT_AREA_OPTIONS = {:rows => 5}
# end
# end
#end

0 comments on commit 0a207dc

Please sign in to comment.