Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How do I reload a model subfile?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
femto gary  
View profile  
 More options Jul 27 2012, 2:59 am
From: femto gary <femto...@gmail.com>
Date: Thu, 26 Jul 2012 23:59:51 -0700 (PDT)
Local: Fri, Jul 27 2012 2:59 am
Subject: How do I reload a model subfile?

Hello all,
  require "sinatra/reloader" if development?

class MyApp < Sinatra::Base
  enable :sessions #, :logging
  configure :development do
    register Sinatra::Reloader
  end
end

#for this, I can reload this my main app file,
but for subfile resides in sub lib dir,

#in header require
$: << File.join(File.dirname(File.expand_path(__FILE__)), 'lib')
require 'client/phone'
$phone = Phone.new

#in app
get '/phone' do
     $phone.foo
    #params.inspect
    #Luna::Session.new
    #"abc"
  end
I know there's no proper for 'requiring the file',
I know I must be missing something here.
but how do I reload those files too?
Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kashyap Kondamudi  
View profile  
 More options Aug 9 2012, 1:51 am
From: Kashyap Kondamudi <kashyap.k...@gmail.com>
Date: Thu, 09 Aug 2012 11:21:10 +0530
Local: Thurs, Aug 9 2012 1:51 am
Subject: Re: How do I reload a model subfile?

You can reload model files by using the 'also_reload' method provided in
Sinatra::Reloader module.

Add a line:

also_reload 'path/to/other/file'

after the register Sinatra::Reloader line in the configure block

configure :development do
   register Sinatra::Reloader
   also_reload 'path/to/sub-model'
   dont_reload 'path/to/bad/sub-model'
end


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »