Skip to content

Commit a891f57

Browse files
Add controller
1 parent 2b480bb commit a891f57

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

1.0

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class GreetingsController < ApplicationController
2+
def random_greeting
3+
@random_greeting = Greeting.all.sample
4+
render json: { greeting: @random_greeting.message }
5+
end
6+
end

0 commit comments

Comments
 (0)