Displaying 20 results from an estimated 3000 matches similar to: "accounts and subdomains"
2006 Feb 08
10
Sharing sessions between subdomains?
Hello,
I know how to share sessions between subdomains in PHP. Can anyone please guide me as to how I can share sessions using Ruby? Where can I set the value of domain for which the cookie is set?
I would like for a user to login on the home page and then go to blog.home.com and not have to login again.
Any guidance/pointers are appreciated.
Thanks''
2006 Feb 04
2
Differentiating between normal site content and accounts with subdomains
I''m using the subdomains as accounts method fine on a project, but
I''m wondering what is the best way to differentiate between account
subdomains to access the app using an account, and www.domain.com and
domain.com in order to show normal site content.
I''ve noticed that on Backpack, it seems that when you leave the
information pages and start using the app,
2006 Feb 08
4
Fixture question...
Ok, I''m pretty sure I''ve seen this done before. I have a fixture that
isn''t named the same as the table I want to insert the stuff into.
Whats the right way to go about this?!
Google has failed me! :(
-Nick
2006 Oct 01
7
Log rotation
Hi mongrel-herders,
I''m just wondering what fellow railsers use to rotate their logs in an
orderly fashion? I''d like to do something lightweight, i.e. (1) rename the
logfile (2, optional) create a new empty logfile and (3) send a signal to
each mongrel in the cluster and have them understand it''s time to reopen
their log file handles. This is what I do with apache and
2005 Dec 29
6
How do I open and read/write to a file?
I need to process some text files quickly. I''ve not been able to find the
answer in the archive. The Ruby Standard Library site times out. Can
someone tell me where to find info on how to:
1. Get a list of filenames in a directory.
2. How to open a file.
3. How to read it a line at a time.
--
Thanks in advance for the help,
-Larry
"Work, work, work...there is no satisfactory
2006 Jan 16
4
Question about self and private
Hi!
There''s something I don''t understand yet about static/private methods. I
hope someone can explain...
E.g.:
class SayHello
def hello(who)
puts "Hello, " + who + "!"
end
def self.say(words)
puts words
end
end
hello = SayHello.new
hello.hello "World" : Hello World!
hello.say "hi" : Error
SayHello.say
2006 Mar 03
1
roobie noobie migration question
I''m just at the "reading various rails tutorials" stage.
One thing that has puzzled me a couple of times so far is the fact that
the creation of the database is not part of the "migration".
The steps as I''ve seen them are always:
1) $ rails myapplication
2) $ mysqladmin yadda yadda to create a table
3) $ script/generate migration myWickedTable
4) put rows
2005 May 03
2
How to put a form for one controller in another controlers view
Hello,
If anyone could help me out with this problem I''d appreciate it...
I''m making a database of event bookings, I have an events table and a
clients table. I''d like to include a form to create a new client in the
form for creating a new event.
This would update the parent form with the new client_id using AJAX
methods (see previous e-mail) so you''d
2006 Mar 27
5
Accessing Session Object from a model
i realise that this goes against the basic idea of the MVC architecture,
but i''ve found myself in a situation where i need to get information
about the current user in a model & i''m not sure how to do it.
Basically, we have a product where each customer has their own profile
with data stored in a separate database. There are some tables in a
common
2005 May 06
7
Rails hosting per user
I''m trying to set up shared rails websites, so every user has its own
public_html for rails scripts.
I''m not really satisfied with the fastcgi approach (cgi scripts can
sometimes be nasty security problems) so I''d like to try the another
approach. (If someone knows a good tutorial on installing rails on FreeBSD
including the fastcgi configuration that would be nice).
2005 Apr 23
7
Validation question
Hi all,
Is there a way to invoke validations at times other than save, create
and update? I know that I can do this by writing my own validation
checks using errors.add_[blah], but I''d like to leverage the existing
validation code.
What I have is two sets of fields in a record, set A and set B. Both
sets must be validated on record create. However, the trouble is that
after
2006 Feb 18
3
scoped databases need explanation...
Could someone explain this
http://blog.leetsoft.com/articles/2005/10/31/scoped-databases
in a way that can be understood with an example if possible. Tobi Lutke
has started to explain but it does not make any sense.
"Since rails 0.13.1 we support calling class methods over associations."
what?? give an example.
also
"The Shop object is figured out at the beginning of each
2005 Jan 24
2
PSTN and Asterisk
Hi quys,
I look for a solution for interconnection beetwen PSTN and VoIP.
My application have to treat few protocols comming from PSTN lines and mixing data , dtmf and voice.
Can I use Asterisk for :
PSTN ----------> Asterisk (converting analog call to IP) ----------> MyApplication ( translation protocols and do some works with incomming data)
What hardware I can use for this?
Do use
2001 Aug 06
1
Sending Keystrokes to a window
Is there any way of sending a set of keystrokes to a window, from a
command line function.
Eg.
$ wine "c:\MyApplication.exe" &> logfile.log &
$ send.key.shell/perl.script
where send.key.shell/perl.scrip will send keystorkes to the wine program
depending on the results of the log file.
Cheers,
Rasjid.
2005 May 17
5
Strings, Variables and GetText
Hi,
I''m starting to use GetText and have this code:
render_text %(<script language="JavaScript" type="text/javascript">
parent.mainframe.onUpdateNew("Gallery <b>#{@media.name}</b> was
successfully created.",
"#{@media.name}","#{String(@media.id)}","#{@media.media_type}");
</script>)
I need to convert
2006 Apr 28
2
validates* gives me problems
Hi,
In Debian/testing (mysql-5.0.20, ruby1.8, rails 1.1.0)
Im trying to follow up the fourdaysonrails tutorial, and when putting:
validates_uniqueness_of :category, :message => "Already exists"
in /myapplication/app/model/category.rb
I get:
NoMethodError in Categories#create
undefined method `category'' for #<Article:0x407f6418>
RAILS_ROOT:
2010 Jul 30
0
`load_missing_constant': uninitialized constant Rails::Railt
Hi All,
I run
rake gems:install
rake gems:unpack
If i add
configure the rspec-rails gem in config/environment.rb:
config.gem "rspec-rails", :version => ">= 1.3.2"
and then run server. I am getting this error:
/home/Amit/Myworkspace/MyApplication/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning:
2006 Jul 11
1
Dynamically setting the session domain?
Does anyone know a way to dynamically change the session_domain option
of ActionController::CgiRequest? I want to have a login section on an
index page (www.example.com) that takes a subdomain, username,
password, authenticates, then redirects to
http://#{subdomain}.mysite.com.
I need to set the session_domain option (to the subdomain) dynamically
so the cookie can be read when the user arrives
2005 Apr 23
2
[Tip] Introspection to determine if a column may be null
I still want to get this into Rails for all connection adaptors, but
for now I''ve hacked my own addition on for just PostgreSQL.
The following code extends every Column object returned by
MyModel.columns to support a new #required? method, which indicates if
the column may or may not be null.
The following is a huge hack - suggestions on a cleaner way to add this
functionality
2006 Jan 18
2
How do you get link_to to work correctly when using subdomains as account keys?
When using subdomains as account keys (as per this HowTo:
http://wiki.rubyonrails.org/rails/pages/HowToUseSubdomainsAsAccountKeys),
how can you get link_to to spit out the correct URL (i.e.
account123.domain.com)?
<%= link_to "My Account", { :action => "show", :id => "account123" }
%> would generate "http://www.domain.com/show/account123"
I