Skip to content

Commit 6144f07

Browse files
committed
Remove use of hashrocket in 'Delete' link code
These days, the "Destroy" link for a scaffolded object defaults to using new-style symbol syntax. This also changes the link from confirm: 'Message' to data: {confirm: 'Message'} which is the way the scaffolds currently do it. confirm: 'message' is deprecated in rails 4.
1 parent 43bd0ea commit 6144f07

8 files changed

+14
-18
lines changed

sites/curriculum/CRUD_with_scaffolding.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ steps {
2323
message "Point your browser to [http://localhost:3000/topics](http://localhost:3000/topics)"
2424
message "You should see a page listing topics that looks something like this:"
2525

26-
img :src => "img/Seattle_topic_list_page.png", :alt => "Topic List Page"
26+
img src: "img/Seattle_topic_list_page.png", alt: "Topic List Page"
2727
}
2828

2929
step {
@@ -33,7 +33,7 @@ steps {
3333
* You should see a confirmation page like this:
3434
MARKDOWN
3535

36-
img :alt=> "topic created", :src => "img/Seattle_topic_created.png"
36+
img alt: "topic created", src: "img/Seattle_topic_created.png"
3737
}
3838

3939
step {

sites/curriculum/clean_up_links_on_the_topics_list.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ steps {
2121
step "Change 'destroy' to 'delete'" do
2222

2323
message "Change the line with the word 'Destroy' to this:"
24-
source_code :erb, "<td><%= link_to 'Delete', topic, :confirm => 'Are you sure?', :method => :delete %></td>"
24+
source_code :erb, "<td><%= link_to 'Delete', topic, method: :delete, data: { confirm: 'Are you sure?' } %></td>"
2525
end
2626

2727
step "Confirm your changes" do

sites/curriculum/creating_a_migration.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
goals {
22

3-
img :alt => "Topics Table", :src => "img/topics_table.png"
3+
img alt: "Topics Table", src: "img/topics_table.png"
44

55
message "The suggestotron has a list of topics that people can vote on. We'll store our topics in the database. In this step you'll do the following:"
66

@@ -40,7 +40,7 @@ explanation {
4040

4141
h2 "Explaining MVC and Records"
4242

43-
img :src => "img/mvc.png", :alt => "MVC"
43+
img src: "img/mvc.png", alt: "MVC"
4444

4545
message "Rails implements a very specific notion of the **Model/View/Controller** pattern, which guides how you structure your web applications."
4646

sites/curriculum/deploying_to_heroku.step

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
h2 do
22
span "If you haven't yet deployed to heroku, start at "
3-
a 'First-time setup', :href => '#first-time'
3+
a 'First-time setup', href: '#first-time'
44
span ". Otherwise, start at "
5-
a 'Every time', :href => '#every-time'
5+
a 'Every time', href: '#every-time'
66
span "."
77
end
88

9-
a :name => 'first-time'
9+
a name: 'first-time'
1010
situation "First-time setup" do
1111
step "Create a heroku application" do
1212
console "heroku create"
@@ -50,7 +50,7 @@ git commit -m "Changed Gemfile for heroku"
5050
end
5151
end
5252

53-
a :name => 'every-time'
53+
a name: 'every-time'
5454
situation "Every time" do
5555
step "Commit any pending changes to git" do
5656
message "Heroku will only receive the files we've committed into our local git repository. So we need to make sure all changed files have been committed."
@@ -98,7 +98,7 @@ explanation do
9898
MARKDOWN
9999

100100
message "You should be able to deploy your application any time it's in a good, working state. Your typical workflow will look like:"
101-
img :src => "img/workflow.png", :alt => "workflow", :style => "border: none"
101+
img src: "img/workflow.png", alt: "workflow", style: "border: none"
102102
ol do
103103
li { message "Add or change some code" }
104104
li { message "Commit your changes (`git commit`)" }

sites/curriculum/getting_started.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
img :src => "img/Start_page.png", :alt => "Start Page"
2+
img src: "img/Start_page.png", alt: "Start Page"
33

44
goals do
55
goal "Create Your New Application"
@@ -45,7 +45,7 @@ steps do
4545
files. The ones we want to focus on today are:
4646
MARKDOWN
4747

48-
table :border=>"1", :cellspacing=>"0", :cellpadding=>"3", :align=>"center" do
48+
table border: "1", cellspacing: "0", cellpadding: "3", align: "center" do
4949
tr {
5050
th "File/Folder"
5151
th "Purpose"

sites/curriculum/hooking_up_votes_and_topics.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
goals {
22

3-
img :alt => "topics_and_votes_table", :src => "img/topics_and_votes_table.png"
3+
img alt: "topics_and_votes_table", src: "img/topics_and_votes_table.png"
44

55
goal "Because there is an explicit relationship between a topic and its
66
votes, we need to specify that. In this step, we'll explicitly

sites/curriculum/setting_the_default_page.step

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ steps {
1616
message "Open `config/routes.rb`. Near the end of the file but before the final end add `root :to => 'topics#index'`. When you are done the last few lines should look like this:"
1717

1818
source_code :ruby, <<-RUBY
19-
# This is a legacy wild controller route that's not recommended for RESTful applications.
20-
# Note: This route will make all actions in every controller accessible via GET requests.
21-
# match ':controller(/:action(/:id(.:format)))'
22-
2319
root :to => 'topics#index'
2420
RUBY
2521
end

sites/curriculum/voting_on_topics.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
goals {
33
goal "Create a model for votes"
44

5-
img :alt => "Topics Table", :src => "img/votes_table.png"
5+
img alt: "Topics Table", src: "img/votes_table.png"
66

77
message "Every topic in suggestotron can be voted on. In order to count votes, we need to record votes. We'll add that table now."
88
}

0 commit comments

Comments
 (0)