Sha256: 35f81711bb352fdaa657eda5d103ded5ceb8868ad9f91ed92861e7a5d2b95ea0

Contents?: true

Size: 679 Bytes

Versions: 7

Compression:

Stored size: 679 Bytes

Contents

json.body raw(@term.to_html)

if @user_term.persisted? && @user_term.state == "accepted" 
  json.status "accepted"
  json.message "#{I18n.t("terms_app.user_terms.show.accepted.message")}"
  json.url reject_user_term_path(params[:id])
  json.method :put
elsif controller.current_user.present? 
  json.status "pending"
  json.message "#{controller.current_user.email} #{I18n.t("terms_app.user_terms.show.pending.message")}"
  json.url accept_user_term_path(params[:id])
  json.method :put
else
  json.status @user_term.state
  json.message  "#{I18n.t("terms_app.user_terms.show.pending.message")} #{params[:id]}"
  json.url accept_user_term_path(params[:id])
  json.method :put
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gdpr_rails-0.5.1 app/views/policy_manager/user_terms/show.json.jbuilder
gdpr_rails-0.5.0 app/views/policy_manager/user_terms/show.json.jbuilder
gdpr_rails-0.4.0 app/views/policy_manager/user_terms/show.json.jbuilder
gdpr_rails-0.3.4 app/views/policy_manager/user_terms/show.json.jbuilder
gdpr_rails-0.3.3 app/views/policy_manager/user_terms/show.json.jbuilder
gdpr_rails-0.3.2 app/views/policy_manager/user_terms/show.json.jbuilder
gdpr_rails-0.3.1 app/views/policy_manager/user_terms/show.json.jbuilder