diff --git a/app/views/admin/admin_users/_admin_user.html.haml b/app/views/admin/admin_users/_admin_user.html.haml index c18c7b8..b683c23 100644 --- a/app/views/admin/admin_users/_admin_user.html.haml +++ b/app/views/admin/admin_users/_admin_user.html.haml @@ -4,4 +4,4 @@ %td= admin_user.last_sign_in_ip %td{ :class => :actions } - unless admin_user == current_admin_user - = link_to "Delete", admin_admin_user_path(admin_user), :method => :delete, :confirm => "Are you sure you wish to delete this Admin User?" \ No newline at end of file + = link_to "Delete", admin_admin_user_path(admin_user), method: :delete, confirm: "Are you sure you wish to delete this Admin User?" diff --git a/app/views/admin/admin_users/edit.html.haml b/app/views/admin/admin_users/edit.html.haml index 3ace240..ff8752b 100644 --- a/app/views/admin/admin_users/edit.html.haml +++ b/app/views/admin/admin_users/edit.html.haml @@ -1,2 +1,2 @@ %h2 Edit Admin User -= render :partial => "form", :locals => { :admin_user => @admin_user } \ No newline at end of file += render partial: "form", locals: { admin_user: @admin_user } diff --git a/app/views/admin/admin_users/edit_password.html.haml b/app/views/admin/admin_users/edit_password.html.haml index c9c4b1b..7b9cc0c 100644 --- a/app/views/admin/admin_users/edit_password.html.haml +++ b/app/views/admin/admin_users/edit_password.html.haml @@ -1,11 +1,11 @@ %h3 Change your password -= simple_form_for(@admin_user, :url => update_password_admin_admin_user_path, :html => { :method => :put }) do |f| += simple_form_for(@admin_user, :url => update_password_admin_admin_user_path, html: { method: :put }) do |f| = inputs_field_set do = f.input :current_password = inputs_field_set do - = f.input :password, :label => "New Password" - = f.input :password_confirmation, :label => "Confirm Password" + = f.input :password, label: "New Password" + = f.input :password_confirmation, label: "Confirm Password" = actions_field_set do = f.submit "Change my password" diff --git a/app/views/admin/admin_users/index.html.haml b/app/views/admin/admin_users/index.html.haml index 6c31788..ff34a15 100644 --- a/app/views/admin/admin_users/index.html.haml +++ b/app/views/admin/admin_users/index.html.haml @@ -8,9 +8,9 @@ %th IP Address %th %tbody - = render :partial => "admin_user", :collection => @admin_users + = render partial: "admin_user", collection: @admin_users %tfoot %tr - %td{:colspan => 4} + %td{ colspan: 4 } %br/ -= link_to 'New Admin User', new_admin_admin_user_path, :class => [:button, :new] += link_to 'New Admin User', new_admin_admin_user_path, class: [:button, :new] diff --git a/app/views/admin/admin_users/new.html.haml b/app/views/admin/admin_users/new.html.haml index 68e75bd..850698d 100644 --- a/app/views/admin/admin_users/new.html.haml +++ b/app/views/admin/admin_users/new.html.haml @@ -1,2 +1,2 @@ %h2 New Admin User -= render :partial => "form", :locals => { :admin_user => @admin_user } \ No newline at end of file += render partial: "form", locals: { admin_user: @admin_user } diff --git a/app/views/admin/categories/_category.html.haml b/app/views/admin/categories/_category.html.haml index ec7ec69..f820ad5 100644 --- a/app/views/admin/categories/_category.html.haml +++ b/app/views/admin/categories/_category.html.haml @@ -2,7 +2,7 @@ %td= category.name %td= category.slug %td= category.base_colour - %td{ :class => :actions } + %td{ class: :actions } = link_to 'Show', [:admin, category] = link_to 'Edit', edit_admin_category_path(category) = link_to 'Destroy', [:admin, category], confirm: 'Are you sure?', method: :delete diff --git a/app/views/admin/categories/edit.html.haml b/app/views/admin/categories/edit.html.haml index ad67433..9e8ee6e 100644 --- a/app/views/admin/categories/edit.html.haml +++ b/app/views/admin/categories/edit.html.haml @@ -1,2 +1,2 @@ %h2 Edit Category -= render :partial => "form", :locals => { :category => @category } \ No newline at end of file += render partial: "form", locals: { category: @category } diff --git a/app/views/admin/categories/index.html.haml b/app/views/admin/categories/index.html.haml index 4903a7f..b6121a1 100644 --- a/app/views/admin/categories/index.html.haml +++ b/app/views/admin/categories/index.html.haml @@ -11,6 +11,6 @@ = render @categories %tfoot %tr - %td{:colspan => 5} + %td{ colspan: 5 } %br/ -= link_to 'New Category', new_admin_category_path, :class => [:button, :new] += link_to 'New Category', new_admin_category_path, class: [:button, :new] diff --git a/app/views/admin/categories/new.html.haml b/app/views/admin/categories/new.html.haml index d765ae7..54f0590 100644 --- a/app/views/admin/categories/new.html.haml +++ b/app/views/admin/categories/new.html.haml @@ -1,2 +1,2 @@ %h2 New Category -= render :partial => "form", :locals => { :category => @category } \ No newline at end of file += render partial: "form", locals: { category: @category } diff --git a/app/views/admin/layouts/admin.html.haml b/app/views/admin/layouts/admin.html.haml index 4e25e5d..d050ce0 100644 --- a/app/views/admin/layouts/admin.html.haml +++ b/app/views/admin/layouts/admin.html.haml @@ -8,7 +8,7 @@ %body #page - %header{ :role => "banner" }= render :partial => "admin/shared/header" - = render :partial => "shared/flash_messages" + %header{ role: "banner" }= render partial: "admin/shared/header" + = render partial: "shared/flash_messages" = yield - %footer{ :role => "footer" }= render :partial => "admin/shared/footer" + %footer{ role: "footer" }= render partial: "admin/shared/footer" diff --git a/app/views/admin/layouts/login.html.haml b/app/views/admin/layouts/login.html.haml index 5c95798..7dc271d 100644 --- a/app/views/admin/layouts/login.html.haml +++ b/app/views/admin/layouts/login.html.haml @@ -8,6 +8,6 @@ %body #login - %header{ :role => "banner" }= render :partial => "admin/shared/login_header" - = render :partial => "shared/flash_messages" + %header{ role: "banner" }= render partial: "admin/shared/login_header" + = render partial: "shared/flash_messages" = yield diff --git a/app/views/admin/pages/_page.html.haml b/app/views/admin/pages/_page.html.haml index 949c8d1..bd8c64c 100644 --- a/app/views/admin/pages/_page.html.haml +++ b/app/views/admin/pages/_page.html.haml @@ -1,7 +1,7 @@ %tr %td= page.name %td= page.title - %td{ :class => :actions } + %td{ class: :actions } = link_to 'Show', [:admin, page] = link_to 'Edit', edit_admin_page_path(page) = link_to 'Destroy', [:admin, page], confirm: 'Are you sure?', method: :delete diff --git a/app/views/admin/pages/index.html.haml b/app/views/admin/pages/index.html.haml index 7f74cf2..603f85b 100644 --- a/app/views/admin/pages/index.html.haml +++ b/app/views/admin/pages/index.html.haml @@ -7,9 +7,9 @@ %th Title %th %tbody - = render :partial => "page", :collection => @pages + = render partial: "page", collection: @pages %tfoot %tr - %td{:colspan => 4} + %td{ colspan: 4 } %br/ -= link_to 'New Page', new_admin_page_path, :class => [:button, :new] += link_to 'New Page', new_admin_page_path, class: [:button, :new] diff --git a/app/views/admin/pages/new.html.haml b/app/views/admin/pages/new.html.haml index f3d37f3..a258f91 100644 --- a/app/views/admin/pages/new.html.haml +++ b/app/views/admin/pages/new.html.haml @@ -1,2 +1,2 @@ %h2 New Page -= render :partial => "form", :locals => { :page => @page } \ No newline at end of file += render partial: "form", locals: { page: @page } diff --git a/app/views/admin/photos/_form.html.haml b/app/views/admin/photos/_form.html.haml index b8a0100..2733958 100644 --- a/app/views/admin/photos/_form.html.haml +++ b/app/views/admin/photos/_form.html.haml @@ -2,7 +2,7 @@ %ul.categories - @categories.each do |photo_category| %li - = check_box_tag "photo[category_ids][]", photo_category.id, @photo.categories.include?(photo_category), :id => "photo_category_ids_#{photo_category.id}" + = check_box_tag "photo[category_ids][]", photo_category.id, @photo.categories.include?(photo_category), id: "photo_category_ids_#{photo_category.id}" = label_tag "photo_category_ids_#{photo_category.id}", photo_category.name = inputs_field_set do diff --git a/app/views/admin/photos/_photo.html.haml b/app/views/admin/photos/_photo.html.haml index 2f9e70f..ff49c18 100644 --- a/app/views/admin/photos/_photo.html.haml +++ b/app/views/admin/photos/_photo.html.haml @@ -1,5 +1,5 @@ .photo - = link_to image_tag(photo.image.admin.url, :title => photo.title), photo.image.url + = link_to image_tag(photo.image.admin.url, title: photo.title), photo.image.url .actions = link_to 'Edit', edit_admin_photo_path(photo) = link_to 'Destroy', [:admin, photo], confirm: 'Are you sure?', method: :delete diff --git a/app/views/admin/photos/edit.html.haml b/app/views/admin/photos/edit.html.haml index 6f956f4..89a482a 100644 --- a/app/views/admin/photos/edit.html.haml +++ b/app/views/admin/photos/edit.html.haml @@ -1,2 +1,2 @@ %h2 Edit Photo -= render :partial => "form", :locals => { :photo => @photo } \ No newline at end of file += render partial: "form", locals: { photo: @photo } diff --git a/app/views/admin/photos/index.html.haml b/app/views/admin/photos/index.html.haml index 746a366..6047404 100644 --- a/app/views/admin/photos/index.html.haml +++ b/app/views/admin/photos/index.html.haml @@ -1,11 +1,11 @@ %h2 Photos -= will_paginate @photos, :remote => true += will_paginate @photos, remote: true .photos - = render :partial => "photo", :collection => @photos + = render partial: "photo", collection: @photos -= will_paginate @products, :remote => true += will_paginate @products, remote: true %br/ -= link_to 'New Photo', new_admin_photo_path, :class => [:button, :new] += link_to 'New Photo', new_admin_photo_path, class: [:button, :new] diff --git a/app/views/admin/photos/new.html.haml b/app/views/admin/photos/new.html.haml index 3621575..bb8fc1e 100644 --- a/app/views/admin/photos/new.html.haml +++ b/app/views/admin/photos/new.html.haml @@ -1,2 +1,2 @@ %h2 New Photo -= render :partial => "form", :locals => { :photo => @photo } \ No newline at end of file += render partial: "form", locals: { photo: @photo } diff --git a/app/views/admin/shared/_header.html.haml b/app/views/admin/shared/_header.html.haml index b804910..b0c8d4a 100644 --- a/app/views/admin/shared/_header.html.haml +++ b/app/views/admin/shared/_header.html.haml @@ -1,3 +1,3 @@ %h1= link_to APP_CONFIG['name'], admin_dashboard_path -= render :partial => "admin/shared/user" -= render :partial => "admin/shared/menu" += render "admin/shared/user" += render "admin/shared/menu" diff --git a/app/views/admin/shared/_menu.html.haml b/app/views/admin/shared/_menu.html.haml index afe9917..e3e06b6 100644 --- a/app/views/admin/shared/_menu.html.haml +++ b/app/views/admin/shared/_menu.html.haml @@ -1,4 +1,4 @@ %nav %ul - @admin_menu.each do |key, value| - = render :partial => "admin/shared/menu_item", :locals => { :menu_item => key } + = render partial: "admin/shared/menu_item", locals: { menu_item: key } diff --git a/app/views/admin/shared/_menu_item.html.haml b/app/views/admin/shared/_menu_item.html.haml index b8fb8ab..c61fc8f 100644 --- a/app/views/admin/shared/_menu_item.html.haml +++ b/app/views/admin/shared/_menu_item.html.haml @@ -1 +1 @@ -%li= link_to menu_item.to_s.gsub(/_/, ' ').titleize, { :controller => menu_item }, :class => (params[:controller] == "admin/" + menu_item.to_s ? "selected" : nil) \ No newline at end of file +%li= link_to menu_item.to_s.gsub(/_/, ' ').titleize, { controller: menu_item }, class: (params[:controller] == "admin/" + menu_item.to_s ? "selected" : nil) diff --git a/app/views/admin/shared/_user.html.haml b/app/views/admin/shared/_user.html.haml index 9071c7e..58bfac4 100644 --- a/app/views/admin/shared/_user.html.haml +++ b/app/views/admin/shared/_user.html.haml @@ -3,4 +3,4 @@ | = link_to "Change Password", edit_password_admin_admin_user_path | - = link_to "Logout", destroy_admin_user_session_path, :method => :delete \ No newline at end of file + = link_to "Logout", destroy_admin_user_session_path, method: :delete