ruby-on-rails-2
Why does this named_scope create a NoMethodError?
I don\'t see where this code is creating this NoMethodFound error, and would really like any helpful suggestions.[详细]
2023-02-16 20:46 分类:问答ActiveRecord Count to count rows returned by group by in Rails
I looked around and couldn\'t find any answers to this. All answers involved counts that did not use a GROUP BY.[详细]
2023-02-12 05:56 分类:问答Set ssl_allowed/ssl_required for all pages in Rails 2?
I found that AJAX calls were not working on my Rails site when a page was using SSL/HTTPS. I worked around this by adding[详细]
2023-02-10 00:04 分类:问答how to have ruby console recognize code changes in controllers and models
I\'m adding new functionality to my ruby model and testing it through the ruby console as I go. I find it very annoying to have to restart the console everytime I change anything in the model. Is ther[详细]
2023-02-09 03:25 分类:问答Rails plugin with a different version of rails
I have a rails 3 app, and I want to use a plugin th开发者_运维百科at requires rails_generator, which is no longer available in rails 3. Can I have the plugin run with Rails 2, and my app run with Rail[详细]
2023-02-09 02:39 分类:问答how to print the executing sql from Active record in rails 2
I would like to print into log or console the executing sql. Where can I make some settings? In hibernate it is in a config file possibility: I think here should be something like that too.[详细]
2023-02-01 21:00 分类:问答How does ActiveRecord implement `:if => ...` on validations
I\'ve been looking through the ActiveRecord source to find out how :if => proc_or_method_name works on ActiveRecord validations, but the only instances of :if in the source are in the comments expl[详细]
2023-01-31 23:37 分类:问答Generate URL for file in /public in Rails 2 ERB view
In my rails (v2.3.8) app I have a static resource file which I\'ve put at /public/myfile.kmlNo need for any special routes.rb setting right?[详细]
2023-01-27 12:37 分类:问答What's the Rails way to access the previous record in a series?
Say I have a Statement model, which has_many :months. There are always 12 months associated with a statement, but the first month can vary (eg months = [Mar, Apr, May...Jan, Feb])[详细]
2023-01-24 02:38 分类:问答Force SSL using ssl_requirement in Rails 2 app
I have a Rails application which need to run under SSL. I开发者_如何学Go tried ssl_requirement but seems I have to type in all the actions in every controllers.[详细]
2023-01-18 22:50 分类:问答