change location using href in javascript for phonegap support
This commit is contained in:
@@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
|
||||
rescue_from SimplyStored::RecordNotFound, with: :show_404
|
||||
|
||||
private
|
||||
|
||||
def authorize_cmtool
|
||||
@@ -15,11 +16,13 @@ private
|
||||
uri = URI.parse(event_host)
|
||||
Net::HTTP.post_form(uri, :message => message.to_json)
|
||||
end
|
||||
|
||||
def broadcast_supplier(sid, event, data = {})
|
||||
message = {channel: "/supplier/#{sid}", data: {event: event, data: data}}
|
||||
uri = URI.parse(event_host)
|
||||
Net::HTTP.post_form(uri, :message => message.to_json)
|
||||
end
|
||||
|
||||
def set_locale
|
||||
I18n.locale = (params[:locale].presence || :nl).to_sym
|
||||
end
|
||||
@@ -31,6 +34,7 @@ private
|
||||
end
|
||||
"theme1"
|
||||
end
|
||||
|
||||
def check_active_list_state
|
||||
if current_user.try(:active_list_id)
|
||||
unless active_list.active?
|
||||
@@ -38,7 +42,6 @@ private
|
||||
redirect_to user_root_path, alert: t('messages.the_list_has_been_closed', list: List.model_name.human)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def active_list
|
||||
|
||||
Reference in New Issue
Block a user