[Rails] Re: Rails Engines/ Railties

2010-11-18 Thread Daniel Guettler
What's your use-case? Theoretically you can stick a normal Rails (2.3.x) app under /vendor/ plugins and it will get picked up. Probably the most important part (in my view) is to namespace your plugin including the routes. E.g. we have a plugin which handles all site related stuff like users, secti

[Rails] Re: browse active directory.

2010-11-18 Thread Daniel Guettler
You could try: http://rubyforge.org/projects/activedirectory/ looked at it shortly before but decided against it since I just needed to authenticated against AD so Net::LDAP was enough for me. On Nov 17, 3:13 am, Mauro wrote: > There is a gem or a plugin suitable to browse an active directory? >

[Rails] Re: Rails 3 skip_before_filter

2010-11-18 Thread Daniel Guettler
Try skip_filter(*names, &blk) instead. On Nov 18, 11:32 am, Ant wrote: > Hi > > I am having trouble with an app I am upgrading to Rails 3 where the > skip_before_filter I have in a controller does not work. > > Looking at the rails 3 docshttp://api.rubyonrails.org/ > > I can't find any mention of

[Rails] Re: Site displays as code?

2010-11-03 Thread Daniel Guettler
Ah forgot, in your case you need rails itself I don't have it on my servers since packed within the application. $ sudo gem install rails On Nov 3, 12:55 am, Daniel Guettler wrote: > Hi Nathan, > > from your previous posts I think you are using Ubuntu here is how I > recently

[Rails] Re: Site displays as code?

2010-11-02 Thread Daniel Guettler
Hi Nathan, from your previous posts I think you are using Ubuntu here is how I recently setup my stack on Ubuntu 10.04 (you may be on 10.10 since you actually have a Ruby 1.9.2-p0 package... 10.04 doesn't) My setup consists of: - nginx for front-end web server - mysql for database - git for sourc

[Rails] Re: Is there a Rails3 way to "scope" views?

2010-10-28 Thread Daniel Guettler
Not sure if it's possible in your architecture, but we are working a lot with namespaces. E.g. you could have a Customs::ShipmentParsChecksController and a Customs::SomeOtherController etc. this would group your controllers, models and views into related sections. Your views then would look like: a

[Rails] Re: HoW to add ruby on rails pages in a PHP application

2010-10-09 Thread Daniel Guettler
We have done it for couple of years, while transitioning one application from php to rails, but in a limited way. Eg we didn't share the rails session with php, but only read session information one way from php to rails. Also you will need some way to update the php session so it doesn't time out

[Rails] Re: Multi databases in rails 3

2010-07-14 Thread Daniel Guettler
It obviously depends on your needs. We are connecting to multiple databases simply because we have to pull information from different systems. We have a main database where most Rails related data lives but we are also connecting to a second system which belongs to our PACS image storage system to

[Rails] Re: Has anybody succeed in getting Rails 3 to work in production?

2010-04-25 Thread Daniel Guettler
Hi Paul, I'm running a test server in production environment with nginx as front-end, ruby-1.9.1-p378 and one mongrel in the backend. The script I'm currently using to start the application is as following: #!/bin/sh export RAILS_ENV=production # kill old server if running if [ -f /home/csb/app

[Rails] Re: making a generic comment model

2010-03-08 Thread Daniel Guettler
You want to make comment a polymophic association e.g. on your person and family model you have: has_many :comments, :as => :attachable then on the comment class you have: belongs_to :attachable, :polymorphic => true and in your table for comments you have: integer :attachable_id string :attac

[Rails] Re: Plugins within plugins

2010-03-07 Thread Daniel Guettler
ge bonus when it comes to keeping all my apps > up to date as I can simply update the version of the gem being used. > > On Mar 8, 2:28 pm, Daniel Guettler wrote: > > > > > What if you simply add the additional plugins to your main > > application? > > At l

[Rails] Re: Plugins within plugins

2010-03-07 Thread Daniel Guettler
What if you simply add the additional plugins to your main application? At least this is what I'm doing... I have 30+ engine plugins which partly depend on each other. So we add whatever is required to the main application. For testing each engine plugin still has to reference all needed plugins bu

[Rails] Re: Rails 3 possible bug in Routing

2010-02-21 Thread Daniel Guettler
Yes thank you, I read Yehuda's articles before but was not thinking of :new_record? when I was working with my Session class. So I had to learn it the hard way. On Feb 21, 2:07 pm, Conrad Taylor wrote: > On Sun, Feb 21, 2010 at 6:11 AM, Daniel Guettler > wrote: > > > > >

[Rails] Re: Rails 3 possible bug in Routing

2010-02-21 Thread Daniel Guettler
it may be worth considering changing the logging to actually read: Started PUT "/login" for 127.0.0.1 IFF the _method parameter is set to :put On Feb 21, 5:01 am, Conrad Taylor wrote: > On Sat, Feb 20, 2010 at 9:14 PM, Daniel Guettler > wrote: > > > What are you trying to prove

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
an ActiveRecord model. On Feb 21, 12:14 am, Daniel Guettler wrote: > What are you trying to prove here? > I'm not using ActiveRecord and my Session class IS NOT inheriting from > ActiveRecord::Base either > > Session.anchestors => [Session, ActiveModel::Validations, >

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
method. On Feb 20, 10:04 pm, Conrad Taylor wrote: > On Sat, Feb 20, 2010 at 6:56 PM, Conrad Taylor wrote: > > On Sat, Feb 20, 2010 at 5:19 PM, Daniel Guettler < > > daniel.guett...@gmail.com> wrote: > > >> Ok but I'm not using an ActiveRecord instance here

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
rad Taylor wrote: > On Sat, Feb 20, 2010 at 4:49 PM, Conrad Taylor wrote: > > On Sat, Feb 20, 2010 at 4:38 PM, Daniel Guettler < > > daniel.guett...@gmail.com> wrote: > > >> Yes, this is correct and expected, the question to me is rather if it > >> is ex

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
Yes, this is correct and expected, the question to me is rather if it is expected behavior to assume an update operation if the object doesn't respond to :new_record? On Feb 20, 7:34 pm, Conrad Taylor wrote: > On Sat, Feb 20, 2010 at 4:32 PM, Daniel Guettler > wrote: > > > S

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
reverse merged later with the provided options this can be avoided by setting explicit :html => { :method => :post } in form_for - not sure though if this is entended behavior... If someone has some inside view comments would be appreciated... On Feb 20, 7:24 pm, Daniel Guettler wrot

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
PUT Session.new.new_record? => NoMethodError Session.new.id => nil On Feb 20, 7:17 pm, Daniel Guettler wrote: > ah the last bit of the previous message should have not been in there, > but should have been in this message. > > Changing the Session class to: > > class Session

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
going on here) makes the everything work correctly with: form_for(Session.new, :url => login_path) This clearly shouldn't be related but this is what I have so far... On Feb 20, 7:11 pm, Daniel Guettler wrote: > not quite the routes you are providing are not equivalent to what I >

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
pm, Conrad Taylor wrote: > On Sat, Feb 20, 2010 at 4:00 PM, Conrad Taylor wrote: > > On Sat, Feb 20, 2010 at 3:02 PM, Daniel Guettler < > > daniel.guett...@gmail.com> wrote: > > >> Hi, I just ran into this ActionController::RoutingError and just > >> wante

[Rails] Re: Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
uting error goes away. Not really sure yet why this... On Feb 20, 6:02 pm, Daniel Guettler wrote: > Hi, I just ran into this ActionController::RoutingError and just > wanted to check if someone can confirm this as a bug in the Rails 3 > beta gem. > > config/routes.rb contains

[Rails] Rails 3 possible bug in Routing

2010-02-20 Thread Daniel Guettler
Hi, I just ran into this ActionController::RoutingError and just wanted to check if someone can confirm this as a bug in the Rails 3 beta gem. config/routes.rb contains: get 'login' => 'session#new' post 'login' => 'session#create', :as => :login GET /login works fine: Started

[Rails] Re: Rails rack - mounting multiple web applications

2010-01-30 Thread Daniel Guettler
Not sure about a blog or tutorial, but I think this project http://github.com/hassox/pancake could match what you're looking for. On Jan 30, 5:52 pm, Kristian wrote: > I remember having stumbled upon a tutorial or blog, describing how to > mount multiple web apps in a single rails/rack applicatio