[Rails] Rails 3.2 with many stylesheet assets in dev mode = error with IE HTC-behaviours

2012-04-11 Thread Carsten Gehling
(FYI: I first posted this question at StackOverflow a couple of days ago without any luck.) I am developing a new web application in Rails 3.2. I have come to the point where I am trying to make everything look as nice in IE as Firefox/Chrome etc. For that I am using CSS3 PIE http://css3pie.com/

[Rails] Add a filter on the ERB %= ... %

2010-06-29 Thread Carsten Gehling
I have a site with a lot of view code like this: p %...@post.user.name% /p Unfortunately a lot of old posts have had their users deleted, so the code above breaks the entire view. I am working on a larger cleanup on the code, but in the meantime I would like to make a quickfix to get the views

[Rails] Re: Add a filter on the ERB %= ... %

2010-06-29 Thread Carsten Gehling
Michael Pavling wrote: Does that make sense? It does make sense, and this is a process that I am currently working through. My example was just a single extract from the application, though, and there are many of these scattered all over the code. So what I really wants is a quick-fix that

[Rails] Re: Re: Add a filter on the ERB %= ... %

2010-06-29 Thread Carsten Gehling
Michael Pavling wrote: Overloading method_missing is probable to cause more problems than it fixes :-) I know - it is a very VERY temporary solution to get peace to do real fixing. :-) You only need to fix the missing associations one at a time; get a MissingUser in there and all the nil

[Rails] Login form as popup modalbox (only the rails part)

2010-04-08 Thread Carsten Gehling
While redesigning an existing application, I've stumbled on a problem. A number of links on the site requires that the user logs in. This is currently solved by the simple (example) %=link_to 'Upload image', :controller = 'image', :action = 'new' % and in the ImageController I place a

[Rails] Re: Login form as popup modalbox (only the rails part)

2010-04-08 Thread Carsten Gehling
Andy Jeffries wrote: OK, so I had a bit more of a play. You'll still need to do this: This (and the previous reply) is exactly what I needed! Thanks a bunch :-) You will probably want to wrap that up in to a method somewhere neater and you'd need to consider that the user may already be

[Rails] How to map a Named Route onto a namespaced resource?

2010-01-20 Thread Carsten Gehling
I have a site, where I am currently adding a self-built shop. Among other stuff I have this construction in my route-file map.namespace :shop do |shop| shop.resources :categories do |categories| categories.resources :products end end I like the namespace, since it encapsulates the shop

[Rails] Specific routing problem

2009-10-28 Thread Carsten Gehling
I am implementing a system for users to easily create a small shop for themselves. And I've run into a route problem. NOTE: I've removed a lot from my route.rb file, since I want focus on this particular problem. :-) I currently have a route.rb like this: ActionController::Routing::Routes.draw

[Rails] Tricky find on associated conditions

2009-07-08 Thread Carsten Gehling
My head is spinning a bit this morning - can somebody help me with this? Given these two models with the following associations: class Article ActiveRecord::Base belongs_to :category - has an attribute called published_on end class Category ActiveRecord::Base has_many :articles end

[Rails] Re: Tricky find on associated conditions

2009-07-08 Thread Carsten Gehling
Gavin Morrice wrote: Off the top of my head, try: Category.all :include = :articles, :order = articles.published_on DESC Works like a charm - thanks! Now that you got my head pointed in the right direction ;-) I noticed, that :joins does the same job for me (ie. same result) with some

[Rails] Re: Architectual question: Engine with all common models

2009-04-13 Thread Carsten Gehling
Marnen: you have one application, accessible through multiple channels. Keep it that way -- since it's one application Andrew: One issue with splitting the application into 3 will be consistency of deployment You could add something like app/importers and app/exporters and treat them like

[Rails] Re: Architectual question: Engine with all common models

2009-04-12 Thread Carsten Gehling
I allow myself to bump this question just once, since I believe, that it is quite relevant at the moment, considering the release of Rails 2.3 - Carsten -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Creation of pdf using rpdf

2009-04-07 Thread Carsten Gehling
Tushar Gandhi wrote: I have one more question Is it possible to create table structure into it? If yes how to do that? Is there any documentation available for the rpdf? You will find all you need here: http://ruby-pdf.rubyforge.org/pdf-writer/ - Carsten -- Posted via

[Rails] Re: Search engine that works with MS SQL Server

2009-02-25 Thread Carsten Gehling
Maurício Linhares wrote: Solr is a full blown full text search tool with most of the features you'll see in enterprise tools like fuzzy searching (that enables ... I will give Solr a go, thanks. One of the things I like about ThinkingSphinx though is the ability to combine Sphinx's free-text

[Rails] Search engine that works with MS SQL Server

2009-02-24 Thread Carsten Gehling
Can anyone recommend a search engine for Rails that works with MS SQL Server? I have good experience in using Sphinx and the Rails plugin UltraSphinx. Unfortunately, it supports only MySQL and PostgreSQL. The newest beta version does add support for MSSQLServer, but only if Sphinx is installed

[Rails] Re: Serverside chart generator

2009-02-10 Thread Carsten Gehling
Peter De Berdt wrote: Gruff (http://rubyforge.org/projects/gruff/) or Scruffy (http://scruffy.rubyforge.org/ Thanks a lot! I am working with Scruffy now, and it works like a charm. :-) One thing I cannot figure out though is: How do I change the legend from horizontal to vertical? Do I

[Rails] Serverside chart generator

2009-02-09 Thread Carsten Gehling
Does any of you know of a good server-side tool for generating line-charts - command-line tool will suffice (one that spits out a JPG, SVG, PNG or such) Something integrated in Ruby would be even nicer :-) - Carsten -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Ruby EE: Problem with BigDecimal

2009-02-07 Thread Carsten Gehling
Marnen Laibow-Koser wrote: Two thoughts: 1. Use composed_of to make the process of String conversion completely transparent. Yeah good idea. 2. Try a REE-specific forum for more help. Already did that - in the Passenger google group. Though I was in doubt if this was a Rails/AR/MySQL

[Rails] Re: Ruby EE: Problem with BigDecimal

2009-02-06 Thread Carsten Gehling
*sigh* I found only one solution: I converted all my decimal fields in the DB to varchar, and rewrote my code to make sure the value was converted to BigDecimal before used in calculations. - Carsten -- Posted via http://www.ruby-forum.com/.

[Rails] Ruby EE: Problem with BigDecimal

2009-02-03 Thread Carsten Gehling
I have a strange problem with my setup of Passenger and Ruby Enterprise Edition. Sometimes the loading of BigDecimals from the database and session fails (silently) and the variable containing the BigDecimal is just empty. I cannot pinpoint where/when/how it happens, and it IS only periodic. I

[Rails] Re: Ruby EE: Problem with BigDecimal

2009-02-03 Thread Carsten Gehling
Small discovery: 1) The problem begins after the application has run for a period of time, e.g ½ hour. 2) If I do a touch tmp/restart.txt the problem disappears - only to resurface again later So I think something is bottling up inside the application. When it happens, it concerns ALL

[Rails] Re: Bug regarding ActiveRecord and TimeWithZone

2009-01-26 Thread Carsten Gehling
Andrew Timberlake wrote: I don't get that error using Edge Rails Whoops - should have tried that first... Sorry :-) And thanks. - Carsten -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Unpacking gems in vendor - but what about dependent gems?

2009-01-26 Thread Carsten Gehling
Let's say, that I need the gem pdf-writer for a rails project. And I define it inside environment.rb and run rake gems:unpack No problem there, pdf-writer is installed into vender/gems. But pdf-writer itself depends on some other gems like color and transaction-simple. AND color depends on

[Rails] Re: Bug regarding ActiveRecord and TimeWithZone

2009-01-25 Thread Carsten Gehling
I will allow myself to bump this question just once, since I think it is important - it really seems like a bug, but I would like to know, if anyone else has experienced this before submitting to the bug list. - Carsten Carsten Gehling wrote: I've discovered a strange behavior regarding

[Rails] Bug regarding ActiveRecord and TimeWithZone

2009-01-23 Thread Carsten Gehling
I've discovered a strange behavior regarding ActiveRecord and TimeWithZone I've seen the error when using SQL Server, I have not yet tried with any other database. Here's output from the console - User is a simple model made with a migration. - d1 =

[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-04 Thread Carsten Gehling
BMorearty wrote: I think InstantRails is actually a great way to install Ruby and Rails on a Windows machine, even though it hasn't been updated since the end of 2007. I still use it for Rails development on Windows. You can use it to install a working Rails 2.0 system and then upgrade to

[Rails] Script to extract text from application

2009-01-03 Thread Carsten Gehling
I have a Rails application, that has grown quite large. At the moment all texts are placed inside the template files like this: h3This is a header/h3 And inside the ruby code (like flash messages, model error messages, etc.) I now have the situation, that I want to place all text in an

[Rails] Re: Installing RoR for a Newbie is a nightmare

2009-01-03 Thread Carsten Gehling
squashua wrote: Hi, I'm a newbie who's tried over a half dozen times now to install the full Ruby and All-in-One RoR app for my Windows XP machine. ... Since you are on Windwos, have you tried InstantRails? http://instantrails.rubyforge.org/wiki/wiki.pl InstantRails is brilliant, as it