initial commit
This commit is contained in:
11
app/views/solutions/index.html.erb
Normal file
11
app/views/solutions/index.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="puzhome">
|
||||
|
||||
<h1> Najnovije pobjede</h1>
|
||||
<% i = 1 %>
|
||||
<% @solutions.each do |solution| %>
|
||||
<div><%=i%>. <%= solution.created_at_formatted %> <%= link_to( solution.username, users_url + "?username=" + solution.username) %>: <%= solution.number %> u vremenu <%=solution.time%></div>
|
||||
<% i += 1%>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
4
app/views/solutions/index.json.jbuilder
Normal file
4
app/views/solutions/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.array!(@solutions) do |solution|
|
||||
json.extract! solution, :number, :time, :username
|
||||
json.url solution_url(solution, format: :json)
|
||||
end
|
||||
1
app/views/solutions/show.json.jbuilder
Normal file
1
app/views/solutions/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.extract! @solution, :number, :time, :username, :created_at, :updated_at
|
||||
Reference in New Issue
Block a user