Permalink
Browse files

slim templates cleanup

  • Loading branch information...
1 parent 558dc8c commit 3358e92dc70d832848bc3cd5dca3ed6463b4bc8d @4r2r 4r2r committed with timurvafin Oct 9, 2012
@@ -1,14 +1,15 @@
- title "Resend confirmation instructions"
-= simple_form_for(resource, :as => resource_name, \
- :url => confirmation_path(resource_name), \
- :html => { :method => :post }) do |f|
+= simple_form_for resource,
+ as: resource_name,
+ url: confirmation_path(resource_name),
+ html: { method: :post } do |f|
legend
| Enter your email address
.form-inputs
- = f.input :email, :required => true
+ = f.input :email, required: true
.form-actions
= f.button :submit, "Resend confirmation instructions"
@@ -3,4 +3,4 @@ p
p
| You can confirm your account email through the link below:
p
- = link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
+ = link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token)
@@ -3,7 +3,7 @@ p
p
| Someone has requested a link to change your password, and you can do this through the link below.
p
- = link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
+ = link_to 'Change my password', edit_password_url(@resource, reset_password_token: @resource.reset_password_token)
p
| If you didn't request this, please ignore this email.
p
@@ -1,18 +1,19 @@
- title "Change your password"
-= simple_form_for(resource, :as => resource_name, \
- :url => password_path(resource_name), \
- :html => { :method => :put }) do |f|
+= simple_form_for resource,
+ as: resource_name,
+ url: password_path(resource_name),
+ html: { method: :put }) do |f|
legend
| Enter new password
- = f.input :reset_password_token, :as => :hidden
+ = f.input :reset_password_token, as: :hidden
= f.full_error :reset_password_token
.form-inputs
- = f.input :password, :label => "New password", :required => true
- = f.input :password_confirmation, :label => "Confirm your new password", :required => true
+ = f.input :password, label: "New password", required: true
+ = f.input :password_confirmation, label: "Confirm your new password", required: true
.form-actions
= f.button :submit, "Change my password"
@@ -1,14 +1,15 @@
- title "Forgot your password?"
-= simple_form_for(resource, :as => resource_name, \
- :url => password_path(resource_name), \
- :html => { :method => :post }) do |f|
+= simple_form_for resource,
+ as: resource_name,
+ url: password_path(resource_name),
+ html: { method: :post } do |f|
legend
| Enter your email address
.form-inputs
- = f.input :email, :required => true
+ = f.input :email, required: true
.form-actions
= f.button :submit, "Send me reset password instructions"
@@ -1,22 +1,25 @@
- title "Edit #{resource_name.to_s.humanize}"
-= simple_form_for(resource, :as => resource_name, \
- :url => registration_path(resource_name), \
- :html => { :method => :put }) do |f|
+= simple_form_for resource,
+ as: resource_name,
+ url: registration_path(resource_name),
+ html: { method: :put } do |f|
legend
| New profile information
.form-inputs
- = f.input :full_name, required: true, :autofocus => true
- = f.input :email, :required => true
- = f.input :password, :autocomplete => "off", \
- :hint => "leave it blank if you don't want to change it", \
- :required => false
- = f.input :password_confirmation, :required => false
- = f.input :current_password, \
- :hint => "we need your current password to confirm your changes", \
- :required => true
+ = f.input :full_name, required: true, autofocus: true
+ = f.input :email, required: true
+ = f.input :password,
+ autocomplete: "off",
+ hint: "leave it blank if you don't want to change it",
+ required: false
+ = f.input :password_confirmation,
+ required: false
+ = f.input :current_password,
+ hint: "we need your current password to confirm your changes",
+ required: true
.form-actions
= f.button :submit, "Update"
@@ -26,7 +29,7 @@ legend
p
' Unhappy?
- = link_to "Cancel my account", \
- registration_path(resource_name), \
- :data => { :confirm => "Are you sure?" }, \
- :method => :delete
+ = link_to "Cancel my account",
+ registration_path(resource_name),
+ data: { confirm: "Are you sure?" },
+ method: :delete
@@ -1,16 +1,17 @@
- title "Sign up"
-= simple_form_for(resource, :as => resource_name, \
- :url => registration_path(resource_name)) do |f|
+= simple_form_for resource,
+ as: resource_name,
+ url: registration_path(resource_name) do |f|
legend
| Create your "#{app_config.app_name}" account
.form-inputs
- = f.input :full_name, required: true, :autofocus => true
- = f.input :email, :required => true
- = f.input :password, :required => true
- = f.input :password_confirmation, :required => true
+ = f.input :full_name, required: true, autofocus: true
+ = f.input :email, required: true
+ = f.input :password, required: true
+ = f.input :password_confirmation, required: true
.form-actions
= f.button :submit, "Sign up"
@@ -1,15 +1,16 @@
- title "Sign in"
-= simple_form_for(resource, :as => resource_name, \
- :url => session_path(resource_name)) do |f|
+= simple_form_for resource,
+ as: resource_name,
+ url: session_path(resource_name) do |f|
legend
| Enter your "#{app_config.app_name}" account
.form-inputs
- = f.input :email, :required => false, :autofocus => true
- = f.input :password, :required => false
- = f.input :remember_me, :as => :boolean
+ = f.input :email, required: false, autofocus: true
+ = f.input :password, required: false
+ = f.input :remember_me, as: :boolean
.form-actions
= f.button :submit, "Sign in"

0 comments on commit 3358e92

Please sign in to comment.