Use ruby 2.x hash syntax
This commit is contained in:
@@ -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 }
|
||||
|
@@ -1,7 +1,7 @@
|
||||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{:charset => 'utf-8'}
|
||||
%meta{charset: 'utf-8'}
|
||||
%title scube
|
||||
= csrf_meta_tag
|
||||
%body
|
||||
|
@@ -1 +1 @@
|
||||
= render 'form', :submit_text => 'Save'
|
||||
= render 'form', submit_text: 'Save'
|
||||
|
@@ -1 +1 @@
|
||||
= render 'form', :submit_text => 'Create'
|
||||
= render 'form', submit_text: 'Create'
|
||||
|
@@ -1,4 +1,4 @@
|
||||
= form_for(:session, :url => sessions_path) do |f|
|
||||
= form_for(:session, url: sessions_path) do |f|
|
||||
%table
|
||||
%tbody
|
||||
%tr
|
||||
|
@@ -1,4 +1,4 @@
|
||||
= form_for @track, :html => { :multipart => true } do |t|
|
||||
= form_for @track, html: { multipart: true } do |t|
|
||||
%table
|
||||
%tbody
|
||||
%tr
|
||||
|
@@ -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
|
||||
|
@@ -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|
|
||||
|
Reference in New Issue
Block a user