Skip to content

Commit c528f03

Browse files
authored
Merge branch 'main' into main
2 parents 40eb973 + 9d90832 commit c528f03

File tree

5 files changed

+26
-7
lines changed

5 files changed

+26
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
dontuseforce: true
1616
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
1717
heroku_app_name: "basemaxrubytest"
18-
heroku_email: "miprio101@gmail.com"
18+
heroku_email: "miprio101@gmail.com"

Gemfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ source 'https://rubygems.org'
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

44
ruby '3.0.1'
5+
# ruby '3.0.2'
56

67
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
78
gem 'rails', '~> 6.1.3', '>= 6.1.3.2'
89
# Use mysql as the database for Active Record
9-
gem 'sqlite3'
1010
gem 'pg'
1111
# Use Puma as the app server
1212
gem 'puma', '~> 5.0'
@@ -27,14 +27,15 @@ gem 'bootsnap', '>= 1.4.4', require: false
2727
# gem 'rack-cors'
2828

2929
group :development, :test do
30-
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
31-
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
30+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
31+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
32+
gem 'sqlite3'
3233
end
3334

3435
group :development do
35-
gem 'listen', '~> 3.3'
36-
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
37-
gem 'spring'
36+
gem 'listen', '~> 3.3'
37+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
38+
gem 'spring'
3839
end
3940

4041
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

app/controllers/homes_controller.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,20 @@ def index
44
@users = User.all
55
render json: @users, status: :ok
66
end
7+
8+
def new
9+
object = User.new(
10+
:ip => "192.168.1.50",
11+
:key_user => "key1",
12+
:key_ip => "key2",
13+
:key_license => "key3",
14+
:datetime => 123,
15+
:datetime_expire => nil,
16+
:use_first => nil,
17+
:use_last => nil,
18+
:is_active => 1
19+
)
20+
object.save
21+
end
22+
723
end

config/routes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
Rails.application.routes.draw do
22
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
33
root to: 'homes#index'
4+
get 'new', to: 'homes#new'
5+
46
end

db/development.sqlite3

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)