Skip to content

Instantly share code, notes, and snippets.

@kalabiyau
Created February 12, 2015 09:49
Show Gist options
  • Select an option

  • Save kalabiyau/eb4950990359579318d8 to your computer and use it in GitHub Desktop.

Select an option

Save kalabiyau/eb4950990359579318d8 to your computer and use it in GitHub Desktop.
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
@jschmid1

Copy link
Copy Markdown

Okay, thanks. I updated it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment