Created
February 12, 2015 09:49
-
-
Save kalabiyau/eb4950990359579318d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git i/app/controllers/activities_controller.rb w/app/controllers/activities_controller.rb | |
| index e94df68..22cbf70 100644 | |
| --- i/app/controllers/activities_controller.rb | |
| +++ w/app/controllers/activities_controller.rb | |
| @@ -1,6 +1,7 @@ | |
| class ActivitiesController < ApplicationController | |
| respond_to :html | |
| + | |
| def index | |
| @activities = Activity.all | |
| end | |
| @@ -13,11 +14,11 @@ class ActivitiesController < ApplicationController | |
| @activity = Activity.new(activity_params) | |
| flash[:success] = 'Successfully created Activity' if @activity.save | |
| respond_with(@activity) | |
| - end | |
| end | |
| def show | |
| @activity = Activity.find(params[:id]) | |
| + respond_with(@activity) | |
| end | |
| def destroy | |
| @@ -29,3 +30,5 @@ class ActivitiesController < ApplicationController | |
| def activity_params | |
| params.require(:activity).permit(:name) | |
| end | |
| + | |
| +end | |
| diff --git i/app/views/activities/show.html.slim w/app/views/activities/show.html.slim | |
| index a18b6ab..b797aa7 100644 | |
| --- i/app/views/activities/show.html.slim | |
| +++ w/app/views/activities/show.html.slim | |
| @@ -1,5 +1,5 @@ | |
| -strong name | |
| - = @activity.name | |
| +strong Name | |
| += @activity.name | |
| div | |
| = link_to 'Back', activities_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay, thanks. I updated it