Add proposals translation interface
* Convert proposal form into translatable one. * Adapt translatable shared spec to define an owner when running at frontend feature specs. * Remove old attributes from strong parameters.
This commit is contained in:
committed by
voodoorai2000
parent
4ce006ec96
commit
bd3bb72370
@@ -1,6 +1,7 @@
|
||||
class Management::ProposalsController < Management::BaseController
|
||||
include HasOrders
|
||||
include CommentableActions
|
||||
include Translatable
|
||||
|
||||
before_action :only_verified_users, except: :print
|
||||
before_action :set_proposal, only: [:vote, :show]
|
||||
@@ -52,10 +53,10 @@ class Management::ProposalsController < Management::BaseController
|
||||
end
|
||||
|
||||
def proposal_params
|
||||
params.require(:proposal).permit(:title, :summary, :description, :video_url,
|
||||
:responsible_name, :tag_list, :terms_of_service, :geozone_id,
|
||||
:skip_map,
|
||||
map_location_attributes: [:latitude, :longitude, :zoom])
|
||||
attributes = [:video_url, :responsible_name, :tag_list,
|
||||
:terms_of_service, :geozone_id,
|
||||
:skip_map, map_location_attributes: [:latitude, :longitude, :zoom]]
|
||||
params.require(:proposal).permit(attributes, translation_params(Proposal))
|
||||
end
|
||||
|
||||
def resource_model
|
||||
|
||||
Reference in New Issue
Block a user