Added extra params to Clients API:
This commit is contained in:
parent
349ccd3af9
commit
a1b087a584
|
@ -11,7 +11,7 @@ module Api
|
||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def client_params
|
def client_params
|
||||||
params.require(:client).permit(:site_name, :site_token, :site_id)
|
params.require(:client).permit(:site_name, :site_token, :site_id, :university, :department, :email, :country, :url)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,11 @@ class Client
|
||||||
field :site_name, type: String
|
field :site_name, type: String
|
||||||
field :site_token, type: String
|
field :site_token, type: String
|
||||||
field :site_id, type: String
|
field :site_id, type: String
|
||||||
|
field :university, type: String
|
||||||
|
field :department, type: String
|
||||||
|
field :email, type: String
|
||||||
|
field :country, type: String
|
||||||
|
field :url, type: String
|
||||||
|
|
||||||
validates :site_id, :uniqueness => true
|
validates :site_id, :uniqueness => true
|
||||||
validates :site_token, :uniqueness => true
|
validates :site_token, :uniqueness => true
|
||||||
|
|
|
@ -13,6 +13,7 @@ Mtstore::Application.configure do
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
|
config.action_mailer.perform_deliveries = true
|
||||||
# Don't care if the mailer can't send.
|
# Don't care if the mailer can't send.
|
||||||
config.action_mailer.raise_delivery_errors = false
|
config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
|
@ -24,4 +25,6 @@ Mtstore::Application.configure do
|
||||||
# This option may cause significant delays in view rendering with a large
|
# This option may cause significant delays in view rendering with a large
|
||||||
# number of complex assets.
|
# number of complex assets.
|
||||||
config.assets.debug = true
|
config.assets.debug = true
|
||||||
|
config.action_mailer.delivery_method = :smtp
|
||||||
|
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue