Use ruby 2.x hash syntax

This commit is contained in:
Thibault Jouan
2014-04-01 10:48:18 +00:00
parent 712e9501a2
commit da96c4814a
52 changed files with 148 additions and 148 deletions

View File

@@ -3,4 +3,4 @@ collection @tracks
attribute :id
attribute :name
node(:sound_url, :if => ->(t) { t.sound? }) { |t| api_sound_url t.sound }
node(:sound_url, if: ->(t) { t.sound? }) { |t| api_sound_url t.sound }

View File

@@ -1,7 +1,7 @@
!!!
%html
%head
%meta{:charset => 'utf-8'}
%meta{charset: 'utf-8'}
%title scube
= csrf_meta_tag
%body

View File

@@ -1 +1 @@
= render 'form', :submit_text => 'Save'
= render 'form', submit_text: 'Save'

View File

@@ -1 +1 @@
= render 'form', :submit_text => 'Create'
= render 'form', submit_text: 'Create'

View File

@@ -1,4 +1,4 @@
= form_for(:session, :url => sessions_path) do |f|
= form_for(:session, url: sessions_path) do |f|
%table
%tbody
%tr

View File

@@ -1,4 +1,4 @@
= form_for @track, :html => { :multipart => true } do |t|
= form_for @track, html: { multipart: true } do |t|
%table
%tbody
%tr

View File

@@ -1,5 +1,5 @@
%h1= @track.name
- if @track.sound?
%audio{:src => sound_path(@track.sound), :controls => true, :autoplay => true}
%audio{src: sound_path(@track.sound), controls: true, autoplay: true}
Your browser does not support the audio element

View File

@@ -1,4 +1,4 @@
= form_for(@user, :url => users_path) do |f|
= form_for(@user, url: users_path) do |f|
- if @user.errors.any?
%ul
- @user.errors.full_messages.each do |m|