[Rails] Re: check for valid email address

2008-10-11 Thread Ramon Miguel M. Tayag
This doesn't exactly answer your question, but I think it may answer your concerns. Send an activation link of some sort to their email that they need to use to join your website. That way, if it exists, then they get the email. Ramon Tayag On Sun, Oct 12, 2008 at 4:22 AM, [EMAIL PROTECTED] <

[Rails] Re: ActionController::MethodNotAllowed: Only get, put, and delete requests are allowed.

2008-10-11 Thread Ramon Miguel M. Tayag
That happens to me when I edit the routes and forget to restart my server. Ramon Tayag On Sun, Oct 12, 2008 at 1:17 AM, lgs <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I'd need some help with a Subject already appeared here, anyway I "re- > post" with same title cause reading the old threads d

[Rails] Re: statistics table via a trigger

2008-10-01 Thread Ramon Miguel M. Tayag
You can have, on your book table, a price_id that points to it's latest price. Thus book.price points to its latest price, while book.prices returns all its prices. Do a after_create on Price to set its book's price_id to itself so that everytime you create a price it'll set the book's price_id.

[Rails] Re: Ruby on Rails on shared host

2008-10-01 Thread Ramon Miguel M. Tayag
Try contacting your host as well :) This is often host specific. Ramon Tayag On Thu, Oct 2, 2008 at 7:24 AM, Tam Kbe <[EMAIL PROTECTED]> wrote: > > Ramon Tayag wrote: >> apache error log, rails log/* [error, production] >> Checkout the cpanel error logs. > > Thanks for you suggestions. Rails lo

[Rails] Re: Ruby on Rails on shared host

2008-10-01 Thread Ramon Miguel M. Tayag
Checkout the cpanel error logs. Ramon Tayag On Wed, Oct 1, 2008 at 1:35 PM, Tam Kbe <[EMAIL PROTECTED]> wrote: > > Hello, > > I built a web app using Ruby on Rails and it's working perfectly on > local host but once I move it to production I get this error message: > Application error > Rails

[Rails] Re: Why doesn't named_scope sort properly?

2008-10-01 Thread Ramon Miguel M. Tayag
Yes this should work... maybe the other have an idea. I have a tip though (it doesn't answer your question): separate that into two named scopes: recent and by_id so that you can do Model.recent(id).by_id More flexible. Ramon Tayag On Thu, Oct 2, 2008 at 2:34 AM, rails_in_dc <[EMAIL PROTECT

[Rails] Re: statistics table via a trigger

2008-10-01 Thread Ramon Miguel M. Tayag
Book having many :prices does make sense. That way you get to keep the history of the price of the book. Of course, the latest price in the association is the current price. Ramon Tayag On Thu, Oct 2, 2008 at 2:05 AM, Anthony E. <[EMAIL PROTECTED]> wrote: > > Robby Russell wrote: >> On Tue,

[Rails] Re: 1 Form, 3 Models?

2008-09-30 Thread Ramon Miguel M. Tayag
I think the complex forms series with Ryan Bates talks about this as well. Ramon Tayag On Wed, Oct 1, 2008 at 6:49 AM, Jason <[EMAIL PROTECTED]> wrote: > > I want to make a single form, but it will potentially create 3 new > models. There are relationships between these models (belongs_to). I

[Rails] Re: FTP gem like AWS-S3?

2008-09-29 Thread Ramon Miguel M. Tayag
Thank you I must've been searching with the wrong terms. Ramon Tayag On Tue, Sep 30, 2008 at 10:47 AM, jemminger <[EMAIL PROTECTED]> wrote: > > http://ruby-doc.org/core/classes/Net/FTP.html --~--~-~--~~~---~--~~ You received this message because you are subscri

[Rails] Re: Limiting Access of Nested Resources

2008-09-28 Thread Ramon Miguel M. Tayag
I've never done this but I'll give my 2 cents anyway: 1) With nested routes, you are always still looking for the user - you fetch it in the Journals controller and that's where you can evaluate it. What you can do is fetch the current_user unless the current_user is an admin or whatever 2) Abou

[Rails] FTP gem like AWS-S3?

2008-09-28 Thread Ramon Miguel M. Tayag
Hey everyone. Is there an FTP gem/plugin that allows you to browse and manipulate an FTP account just like AWS-S3 does with Amazon's S3 buckets? Thanks, Ramon Tayag --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "R

[Rails] Are all gems freezable?

2008-09-25 Thread Ramon Miguel M. Tayag
Hi everyone, Are all gems freezable? I've got all the gems my application requires in my vendor folder. However, when I start it in a computer without some of those gems installed, I get errors. The error goes away when I install the gem in the system. This happens to me with RedCloth, for ex

[Rails] Re: How to create a Light Box Albumn

2008-09-25 Thread Ramon Miguel M. Tayag
Check their site, http://www.lokeshdhakar.com/projects/lightbox2/#how Just make sure you html code is rendered like that and you should be fine. Ramon Tayag On Wed, Sep 24, 2008 at 5:46 PM, NormBoy <[EMAIL PROTECTED]> wrote: > > Hi > > I am using lightbox on my first rails project. I have go

[Rails] Re: No css formatting

2008-09-24 Thread Ramon Miguel M. Tayag
When you go to localhost:3000/stylesheets/your-stylesheet.css does it come out ok? Ramon Tayag On Wed, Sep 24, 2008 at 1:34 AM, Martin Hawkins <[EMAIL PROTECTED]> wrote: > > yes and the source code of the page looks good.. > > On Sep 23, 5:55 pm, Shandy Nantz <[EMAIL PROTECTED]> > wrote: >> Mar

[Rails] Re: Observer doesn't work properly... in development?

2008-09-21 Thread Ramon Miguel M. Tayag
Thanks conrad this'll be useful :) On Sat, Sep 20, 2008 at 7:34 PM, Conrad Taylor <[EMAIL PROTECTED]> wrote: > On Sat, Sep 20, 2008 at 3:53 AM, Ramon Miguel M. Tayag > <[EMAIL PROTECTED]> wrote: >> >> I transferred the callback to the model, and it seems that

[Rails] Re: Observer doesn't work properly... in development?

2008-09-20 Thread Ramon Miguel M. Tayag
I transferred the callback to the model, and it seems that it's the same problem. I think the problem lies in BackgroundRB then, not Rails or the observer. Thanks for reading my previous mail though! Off to the backgroundrb mailing list. On Sat, Sep 20, 2008 at 6:22 PM, Ramon Miguel M.

[Rails] Re: Best DB structure - any advice?

2008-09-20 Thread Ramon Miguel M. Tayag
Since a city has_many pictures this tell you that the pictures table has a city_id foreign key in it. There isn't a nice way to do it the other way around. On Sat, Sep 20, 2008 at 5:43 PM, Pod Caster <[EMAIL PROTECTED]> wrote: > > Hi, I have a basic question about how to setup my models and DB >

[Rails] Re: How to make logout link appear everywhere

2008-09-20 Thread Ramon Miguel M. Tayag
Put it in a layout (app/views/layout) - if logged_in? = link_to "Logout #{current_user.login}", logout_path These layouts are used when a controller is told to use them via: layout 'layoutname' On Sat, Sep 20, 2008 at 5:09 PM, Commander Johnson <[EMAIL PROTECTED]> wrote: > Hi, > When users

[Rails] Observer doesn't work properly... in development?

2008-09-20 Thread Ramon Miguel M. Tayag
Hey all! Ok, weird problem with observer. Most of the time, the after_create of UserObserver isn't called. It's like it just skips it altogether. However, when I stop the server, add a line "debugger" in the after_create block, and restart the server with the debugger option, and try creating a

[Rails] Re: [Rails]

2008-09-18 Thread Ramon Miguel M. Tayag
There are nice authentication frameworks out there.. I suggest trying those. You can use them or study them until you understand how to make your own. Check out http://railsforum.com/viewtopic.php?id=14216&p=1 On Thu, Sep 18, 2008 at 8:08 PM, Gilbert Gift Siima <[EMAIL PROTECTED]> wrote: > > He

[Rails] Re: Help with object level roles & permissions

2008-09-18 Thread Ramon Miguel M. Tayag
I would separate it... keep the roles and permission you have with activefx's tutorial. Then your group or channel has_one :administrator, has_many :notables, has_many :members, :through => :memberships, has_many :memberships Maybe even the membership model can contain what capacity the user

[Rails] Re: xls export

2008-09-17 Thread Ramon Miguel M. Tayag
Searching for: export excel rails leads many results :) http://www.google.com.ph/search?q=export+excel+rails&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a On Wed, Sep 17, 2008 at 6:07 PM, Seb <[EMAIL PROTECTED]> wrote: > > how can i do xls export?plugin recquired? -- R

[Rails] Re: Time slow by one hour.

2008-09-08 Thread Ramon Miguel M. Tayag
Shouldn't it be created_at? There's nice time_zone support in Rails 2.. is it 2.1? Not too sure. What's your version? On Mon, Sep 8, 2008 at 5:53 PM, Sunny Bogawat <[EMAIL PROTECTED]> wrote: > > Hi, > In my application I have to correct the time stamp on event > discussion posts. Perhaps the