Class: RPlatform::Rails::CallbackPathStatusCheck

Inherits:
StatusCheck
  • Object
show all
Defined in:
lib/rplatform_rails/status_manager.rb

Instance Method Summary collapse

Methods inherited from StatusCheck

#message, #valid?

Constructor Details

#initialize(controller) ⇒ CallbackPathStatusCheck

Returns a new instance of CallbackPathStatusCheck.



194
195
196
197
198
199
200
201
# File 'lib/rplatform_rails/status_manager.rb', line 194

def initialize(controller)
  @controller = controller
  @valid = false
  begin
    @valid = @controller.facebook_callback_path.size > 0
  rescue
  end
end

Instance Method Details

#invalid_messageObject



211
212
213
214
215
216
217
218
# File 'lib/rplatform_rails/status_manager.rb', line 211

def invalid_message
  begin
    FACEBOOK[:test]
    return "you need to define <strong>callback_path</strong> in facebook.yml"
  rescue
    return "you need to define s<strong>facebook_callback_path</strong> in your controller"
  end
end

#titleObject



203
204
205
# File 'lib/rplatform_rails/status_manager.rb', line 203

def title
  "facebook_callback_path"
end

#valid_messageObject



207
208
209
# File 'lib/rplatform_rails/status_manager.rb', line 207

def valid_message
  @controller.facebook_callback_path
end