[Rails] Rails 2.3 Issue with bootstrap radiant CMS
Hi, while i doing "rake production db:bootstrap" in Rails 2.3 for radiant cms I getting the following error, can anyone help me to sort out this problem. (in /home/x/Projects/XXX) Extensions cannot be used until Radiant migrations are up to date. rake aborted! uninitialized constant ActionMailer::ARMailer Best Regards, *Gopinath M* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPDEix%2Bij01rmeKqEN165cy9CD3j6xMSAOuFQvPbTj4f%2BZhFbQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Rails] Rails 2.3 not supported?
On Sunday, March 4, 2012 7:59:41 PM UTC+2, Walter Lee Davis wrote: > > Maybe 2.3 wasn't affected?? >From the original announcement [https://groups.google.com/d/topic/rubyonrails-security/CdoMUVpsRmQ/discussion]: > Versions Affected: All. > Fixed Versions: 3.2.2, 3.1.4, 3.0.12 > Please note that only the 3.2.x, 3.1.x, and 3.0.x series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible. This leaves me with an uneasy feeling as a user of a few projects still based on 2.3 series... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/368GA-TeQ6AJ. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3 + Devise + Omniauth
I am making one last-ditch request for help here, after spending the entire weekend googling and yak-shaving with this combination. I have a single-sign-on working perfectly with a Rails 3.1 Oauth2 provider and a Rails 3.0 client. Now, trying to duplicate that early success with a Rails 2.3 site that also has to be a client, I have hit a wall. Devise didn't support Omniauth until 1.2 or so, but as far as I can tell, 1.2 won't run under Rails 2.3. Can anyone point me to a solution? Otherwise I have to upgrade the site to Rails 3, and I'm not looking forward to telling the client that she has to pay for that on top of everything else. Thanks in advance, Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Rails 2.3 not supported?
On Mar 1, 2012, at 4:15 PM, Paul E. G. Lynch wrote: > The security fix announcement today sent to the rubyonrails-security > group implied that Rails 2.3 is no longer supported. Is that the > case? Did I miss an announcement somewhere? Is there a list of > supported releases somewhere? (What was I supposed to be paying > attention to?) Thanks, > > --Paul > Maybe 2.3 wasn't affected?? Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Rails 2.3 not supported?
+1 On Fri, Mar 2, 2012 at 1:15 AM, Paul E. G. Lynch wrote: > The security fix announcement today sent to the rubyonrails-security > group implied that Rails 2.3 is no longer supported. Is that the > case? Did I miss an announcement somewhere? Is there a list of > supported releases somewhere? (What was I supposed to be paying > attention to?) Thanks, > > --Paul > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3 not supported?
The security fix announcement today sent to the rubyonrails-security group implied that Rails 2.3 is no longer supported. Is that the case? Did I miss an announcement somewhere? Is there a list of supported releases somewhere? (What was I supposed to be paying attention to?) Thanks, --Paul -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Rails 2.3.X weird problem with Created On
On Wed, Mar 16, 2011 at 10:26 AM, sw0rdfish wrote: > however for some reason the created_on field is getting updated What database? How is the table in question defined? It sounds like what would happen if `created_on` were a MySQL TIMESTAMP field... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Rails 2.3.X weird problem with Created On
The SQL in the log shows no created_on right? Could the database itself have a trigger? Top-posted from my iPhone On Wednesday, March 16, 2011, sw0rdfish wrote: > Hey everyone... I've been out of the game for awhile so you're going > to have to excuse the fact that it's Rails2.3 > > Currently the app is running 2.3.3, I just updated it to 2.3.11 > > An object is edited, and saved using the .save command and the SQL > generated in the logs is as follows > > > UPDATE `calc_sheets` SET `is_us_connection` = 0, `holding_date_end` = > '0001-02-11', `updated_on` = '2011-03-16 13:14:00', `extra_chars` = '' > WHERE `id` = 657 > > however for some reason the created_on field is getting updated, and > obviously shouldn't be. Is there some bug that I'm not aware of. I > did some searching, looking and reading and nothing jumped out at > me. > > Any advice? > > I realize this is out dated code, the app is fairly old, and the > clients aren't ready to updated it... this "bug" however is causing > all kinds of havoc. > > Thanks in advance for any advice. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3.X weird problem with Created On
Hey everyone... I've been out of the game for awhile so you're going to have to excuse the fact that it's Rails2.3 Currently the app is running 2.3.3, I just updated it to 2.3.11 An object is edited, and saved using the .save command and the SQL generated in the logs is as follows UPDATE `calc_sheets` SET `is_us_connection` = 0, `holding_date_end` = '0001-02-11', `updated_on` = '2011-03-16 13:14:00', `extra_chars` = '' WHERE `id` = 657 however for some reason the created_on field is getting updated, and obviously shouldn't be. Is there some bug that I'm not aware of. I did some searching, looking and reading and nothing jumped out at me. Any advice? I realize this is out dated code, the app is fairly old, and the clients aren't ready to updated it... this "bug" however is causing all kinds of havoc. Thanks in advance for any advice. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Rails 2.3 basic routing question
Here's what I've tried so far, without success: map.connect '/yes/:token', :controller => 'users', :action => 'confirmation', :invitation_token => :token map.connect '/yes/:invitation_token', :controller => 'users', :action => 'confirmation' I tried these both after the map.devise_for :users line, so as to not screw with the already working login system. Walter On Mar 11, 2011, at 11:12 AM, Walter Lee Davis wrote: I'd like to shorten up a confirmation link so that users won't have text-wrapping issues in their e-mail clients. My links look like this (using Devise confirmable): http://example.example.com/users/invitation/accept?invitation_token=4O-R8B9XbJdB1OIa2J27 and I'd like to make them more like http://example.example.com/yes?t=4O-R8B9XbJdB1OIa2J27 or even shorter if possible. Is there a simple way to do this in routing? Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails- t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en . -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3 basic routing question
I'd like to shorten up a confirmation link so that users won't have text-wrapping issues in their e-mail clients. My links look like this (using Devise confirmable): http://example.example.com/users/invitation/accept?invitation_token=4O-R8B9XbJdB1OIa2J27 and I'd like to make them more like http://example.example.com/yes?t=4O-R8B9XbJdB1OIa2J27 or even shorter if possible. Is there a simple way to do this in routing? Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3.x documentation archive?
Hi, I'm a developer on several projects using rails 2.3.4 and since the release of 3.0, I haven't been able to find any documentation for 2.3.4 online. I have the rdocs from the gem install, but haven't been able to find anything else. Is this stuff archived somewhere? Thanks! -Tom -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] [Rails 2.3] Adding a "phase" to the ActiveRecord Lifecycle
I've run into a situation where it seems to me that if I could "extend" the typical AR lifecycle to add another "phase" or step to it, it would simplify things. My problem is that I just don't know how to do that, and I haven't been able to find documentation anywhere on it! I'm working on an e-commerce application that's somewhat complex. Due to constraints of the organization, I can't have accounts or authentication. My theoretical approach is to store an "order ID" in a user's session, and of course all selects/updates etc. will be only for that ID from their session, thus keeping the current status of the order in the database at all times. If it were something simple I'd just store an array of object IDs in the user's session, but there are several different kinds of products/services to buy, each with vastly different models and various requirements ("if you have this you must have that but MUST NOT have this", etc.). The AR lifecycle question comes into play because I'd like to add some form of validation on the Order model, but ONLY before and after the user's card is charged. So here's a simple example - Order < ActiveRecord::Base belongs_to :object has_many :item_joins has_many :items, :through => :item_joins has_many :other_item_joins has_many :other_items, :through => :other_item_joins # ... and so on ... end Because the user can add multiple items and other items to their order, as well as set the "object" on their order at any point in the ordering process, I can't call the validations I want after save. I'd much rather have a before/after "card_charged" step in the lifecycle, and run a validation before the card is charged, then one after it's charged. So, for example, I'd like to be able to do something like: Order < ActiveRecord::Base # ...associations as above... before_charged :ensure_not_empty private def ensure_not_empty if self.items.count < 1 and self.other_items.count < 1 errors.add_to_base("Your order is empty!") return false end end And this would need to fire when Order#charge_card (or similarly named method) is called, canceling the call to Order#charge_card if false is returned. I took a quick look at state machines (aasm), and I have to confess that I don't know much about a state machine or how one works other than very basic theory. It seems like it might be overkill to me, when all I want to do is add two methods to the lifecycle as above. However, I'm fully willing to consider the possibility that what I'm suggesting here is outside the realm of best practices. Any ideas as to how I could add these steps to the lifecycle of just this object? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3 SafeBuffer leaked evil all over my yaml
I've been googling for a while to find a solution to this, but can't seem to. What's happening is that after upgrading from rails 2.1 to rails 2.3, my YAML started getting, for lack of a better word, 'evil' due to the introduction of the SafeBuffer class. I thought SafeBuffer was related to ERB implementation only but it seems to have affected the output generated by .to_yaml, causing clients that want to parse this yaml to choke (not knowing anything about SafeBuffers). Grepping rails source for SafeBuffer I see nothing that could affect the yaml class...so it seems the safebuffer This is what an evil-ized safebuffered yaml looks like (just a piece of it) BAD/EVIL: somevalue: !str str: "yes" "@_rails_html_safe": false GOOD (before safebuffers) somevalue: yes Any ideas greatly appreciated! Yan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request
Cant you just do `request.server_port' in controller? 2009/12/9 Thomas : > For debugging purpose I find it helpful to see which mongrel out of an > upstream cluster, specifically which port number, handles an actual > request. For example, let the load balancer operate on port 3000 > (development) and the upstream mongrel cluster operating on ports 4000 > upto 4002, then I would like to see not only the port 3000 (eg. using > request.host_with_port in a controller) but also the port number of > the actual mongrel instance. > > With Rails 2.1 I used session.cgi to spot the mongrel port (4000, 4001 > or 4002), however, I was not able to figure this out in Rails 2.3 > which is using the rack middleware. > > Any idea, how to do it? > > Greetings and thanks! > Thomas > > -- > > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request
For debugging purpose I find it helpful to see which mongrel out of an upstream cluster, specifically which port number, handles an actual request. For example, let the load balancer operate on port 3000 (development) and the upstream mongrel cluster operating on ports 4000 upto 4002, then I would like to see not only the port 3000 (eg. using request.host_with_port in a controller) but also the port number of the actual mongrel instance. With Rails 2.1 I used session.cgi to spot the mongrel port (4000, 4001 or 4002), however, I was not able to figure this out in Rails 2.3 which is using the rack middleware. Any idea, how to do it? Greetings and thanks! Thomas -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails 2.3 Model.touch(:column) always also updates :updated_at???
Hi, Am I the only one (i.e. something I do is wrong), or does the touch- method always update updated_at, even though giving it a column to use INSTEAD is meant to update just that column??? Thanks, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3.x and production mode
Is it necessary to add ENV['RAILS_ENV'] ||= 'production' in rails 2.3.x environment.rb? It's not there by default anymore. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3.x and active_scaffold Installation
Hi, I have upgraded to rails 2.3 and active_scaffold plugin is not working. when i run this command it creates a active_sacaffold folder in vendor/ plugins, but its an empty folder. I googled but found no way to install it. Please help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] rails 2.3 view caching in development
Anybody knows hot to disable views caching in development on rails 2.3? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] [Rails 2.3] nested_attributes and validation of nested model
Hi, I'm using nested models to create form in my view. It looks like this: <% form_for :user, :url => {:action => "add_owner" }, :html => { :method => :post } do |u| %> Name: <%= u.text_field :name %> Surname: <%= u.text_field :surname %> <% u.fields_for :agency_owner_attributes do |ao| %> Agency name: <%= ao.text_field :name %> Address: <%= ao.text_field :address %> <% end %> <% end %> Both models: User and AgencyOwner: class User < ActiveRecord::Base has_one :agency_owner accepts_nested_attributes_for :agency_owner validates_associated :agency_owner # - validation here - # end class AgencyOwner < ActiveRecord::Base belongs_to :user, :class_name => "User", :foreign_key => "user_id" # - validation here - # end Controller: def add_owner @user = User.new(params[:user]) @user.save end The problem: The whole idea of nested models is working. I can create two objects (user and agency_owner) at once. When I display error_messages_for 'user' I get validation errors for both models (User and AgencyOwner) - it's working very well. But "fieldWithErrors" is shown only for fields from User model, so It's impossible for highlight all error fields from nested model. Do you have any idea how to fix it? thanks for help -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 Localized Views issues with IE
Hey all, Having issues under IE with localized views... whenever it tries to get a xxx.fr.html.erb IE spits out a File Download Security Warning dialog ?!? Firefox works fine... and I cant seem to find any info on the web of issues of this kind... I'm seeing these problems locally and on my VPS. My Env.: Rails 2.3.2 RubyGems 1.3.2 Ruby 1.8.6 Thanks, Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3
Hello, I've been looking on the Internet for how to use libxml within Rails. What I'm seeing is a little confusing. If you install the libxml gem, will Rails automatically use that because its installed or do you have to explicitly set libxml to be the default after you've installed it? This posting http://www.coffeepowered.net/2009/03/16/things-to-do-when-upgrading-to-rails-23/ Says to set this in the environment file. 1. ActiveSupport::XmlMini.backend = 'LibXML' But when I do that my app crashes. Anyone have any experience with this? thanks, binh -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] rails 2.3 nested forms with has_many through checkboxes
I was wondering if anyone knew of a way to combine the new nested forms in rails 2.3 with a has_many through relationship via checkboxes. Basically I have a page model, a page_category model and a category_items join table. Pages have many page categories through category items. The category_items table is polymorphic so i can use it for other models who need categories (maybe this is overcomplicating everything though?). In a page's edit form I want to be able to dynamically add new category fields and then associate the new ones I create and the other already created page categories to the current page via checkboxes. Hopefully this makes sense and can actually be done, I'd rather not have to go to another controller/form just to create and edit page categories. class Page < ActiveRecord::Base has_many :category_items, :as => :item, :dependent => :destroy has_many :page_categories, :through => :category_items, :source => :category, :source_type => "PageCategory", :uniq => true accepts_nested_attributes_for :page_categories, :allow_destroy => true, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } end class PageCategory < ActiveRecord::Base has_many :pages, :through => :category_items, :source => :item, :source_type => 'Page', :uniq => true end class CategoryItem < ActiveRecord::Base belongs_to :category, :polymorphic => true belongs_to :item, :polymorphic => true end Page Category partial for my page form (hooks into a jquery script to dynamically add/remove page category form fields)... Categories<%= hidden_field_tag "page[page_category_ids][]", "" %> <%- for category in PageCategory.all -%> <%= check_box_tag "page[page_category_ids][]", category.id, @page.page_categories.include?(category), :class => "checkbox" %> <% f.fields_for category do |category_form| %><%= category_form.text_field :title, :style => "width: 200px;", :class => "textfield small formElement" %><% end %> <%- end -%> Right now, if I try and create or update a page I get the following error... ActiveRecord::UnknownAttributeError in Admin/pagesController#update unknown attribute: page_category RAILS_ROOT: /Users/rajo/Sites/boilerplate Application Trace | Framework Trace | Full Trace /Users/rajo/Sites/boilerplate/vendor/rails/activerecord/lib/ active_record/base.rb:2745:in `attributes=' /Users/rajo/Sites/boilerplate/vendor/rails/activerecord/lib/ active_record/base.rb:2741:in `each' /Users/rajo/Sites/boilerplate/vendor/rails/activerecord/lib/ active_record/base.rb:2741:in `attributes=' /Users/rajo/Sites/boilerplate/vendor/rails/activerecord/lib/ active_record/base.rb:2627:in `update_attributes' /Users/rajo/Sites/boilerplate/app/controllers/admin/ pages_controller.rb:107:in `update' /Users/rajo/Sites/boilerplate/app/controllers/admin/ pages_controller.rb:106:in `update' Request Parameters: {"commit"=>"Save", "_method"=>"put", "authenticity_token"=>"DvvJPsU9c942x1Ak5wOIm8V4wYv8AClftKJ7ohGqOo0=", "id"=>"about", "page"=>{"name"=>"About", "title"=>"About Us", "body"=>"About this site.", "published"=>"1", "page_category"=>{"title"=>"Default Two"}, "page_category_ids"=>["", "1", "2"], "home"=>"0"}} Show session dump Response Headers: {"Content-Type"=>"", "Cache-Control"=>"no-cache"} Thanks for any help in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 memcache performance drop
After much effort I upgraded our fairly large Rails app from 2.1 to 2.3. After deployment yesterday I noticed an across the board increase in response times. It seems that every call to memcache now takes 10x longer than before. Here are some example numbers from my development log (below), with memcache running locally. We see similar scale of performance drop in production as well - average memcache call before 2ms, now 20ms. It adds up to a significant hit. Before Rails 2.3 upgrade: Cached fragment hit: views/homepage_recent_blog_posts (0.00043) Cached fragment hit: views/homepage_active_threads (0.00033) Cached fragment hit: views/homepage_weekly_feature (0.00029) Cached fragment hit: views/homepage_recent_approved_items (0.00036) Cached fragment hit: views/homepage_popular_items (0.00037) Cached fragment hit: views/number_of_members (0.00032) After Rails 2.3 upgrade: Cached fragment hit: views/homepage_recent_blog_posts (3.2ms) Cached fragment hit: views/homepage_active_threads (3.5ms) Cached fragment hit: views/homepage_weekly_feature (2.9ms) Cached fragment hit: views/homepage_recent_approved_items (2.8ms) Cached fragment hit: views/homepage_popular_items (3.1ms) Cached fragment hit: views/number_of_members (6.7ms) Before I start delving into the memcache internals in Rails 2.3, has anyone else experienced this degradation on their apps? Is there a magic 'make it fast again' switch that I can flick? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 nested forms and transactions
Hi all, Does anyone know if the new nested object forms in Rails 2.3 supports transactions on save? (http://guides.rubyonrails.org/ 2_3_release_notes.html#nested-object-forms) Supposing you had a form that let users of an app create an account and the admin user account in the same screen, nested object forms seem like a good fit. However, creating the customer account and the user need to be done as a transaction (you wouldn't want a customer without an admin user or vice versa). How is this handled? Is this the default? Does it need to be implemented in a :reject_if proc? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 and TimeZone
My rails 2.3 app is interpreting times retrieved from the database as local (in my case, Eastern) instead of UTC. I created a test table in a SQL Server database with one row. The table is called events and contains an "edate" column. The value is "2009-03-30 12:00", and is a UTC time. environment.rb contains config.time_zone = 'UTC' The output from script/console is below. (results are identical to using a browser) It looks like rails is assuming the database value is really a local time, and it adds four hours to get UTC. But that is wrong, since the time is already UTC. What else do I need to do to convince rails to leave the time value alone, since it *is* a UTC value? I can get the correct value by extracting the "Time" with no zone, and then recreating a new TimeWithZone. But that can't be the best way! Loading development environment (Rails 2.3.2) >> Time.zone => # >> event=Event.find(1) => # >> event.edate => Mon, 30 Mar 2009 16:00:00 UTC +00:00 >> zutc= ActiveSupport::TimeZone.new('UTC') => #, @utc_offset=0, @name="UTC"> >> correct_time = ActiveSupport::TimeWithZone.new(event.edate.localtime,zutc) => Mon, 30 Mar 2009 12:00:00 UTC +00:00 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 <--> ARMailer (emails not in db table anymore)
Hi there, since I updated to Rails 2.3, the "ARMailer" gem doesn't seem to do its job anymore: When I try to send out some emails, they don't appear in the database table anymore where they should be queued (and they don't appear in my inbox, neither -> don't seem to be sent out). The log (development mode) actually shows all the emails entirely (actually, I see in the log what I would normally see in the table). Does anybody have an idea what that is supposed to mean? And is it normal that emails are outputted entirely in the development log? Thanks for your help! Tom -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 Sessions
I've just upgraded to Rails 2.3.2. I am using active_record_store as my session approach and session.model is deprecated. I was using that to update a couple extra session db columns. Does anyone knows what is the best approach for that now, since ActiveRecord::SessionStore does not help that much? thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 Nested models
I am moving an existing app from rails 2.2.2 to 2.3.2, and really like the idea of the new nested model implementation, but I'm having some issues. Has anyone written a good comprehensive howto for the new nested model stuff in Rails 2.3? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] [Rails 2.3] named routes bug ?
Hi, I'm using this path : admin_gallery_photos_path(gallery,session_key => cookies[session_key], request_forgery_protection_token => form_authenticity_token) log show : Parameters: {"_my_session"=>"BAh7CToMdXNlcl9pZGkGOhBfY3NyZl90b2tlbiIxMHk2T3luai9qUW1QditVaFdKS1hWbDVHS2ZtWWZuNFdVQ3BWNWdYaFNWND06D3Nlc3Npb25faWQiJWY4MjVmOTVlMWM1MGE5NmM2MzA0OGJkYzVhMzhlOTkxIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA-- a2b8debd77685e95a155b56d0b72de3fcb282d4f", "amp;authenticity_token"=>"0y6Oynj/jQmPv +UhWJKXVl5GKfmYfn4WUCpV5gXhSV4="} why a "amp;" is add before authenticity_token ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 really checks for presence of $RAILS_ROOT/public/index.html
Just sharing a Rail 2.3.2 upgrade experience. My app was running on 2.1.1 before I upgraded. Most things worked but I could not get my default route in routes.rb to work. The default route URL was "/". I had a route like this in routes.rb as the very last route: map.connect "", :controller => "foo", :action => "bar" So users who went to the base URL would be directed to the foo controller. This stopped working with Rails 2.3.2 and I wasted half a day figuring out what was wrong. Turns out, I just needed to delete public/ index.html. That's it. The same route works perfectly after deleting that file. There is a comment in the Rails code which mentions this but I don't see it in the documentation for Rails routes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 and helpers within plugins
Hi, I'm porting a plugin of mine to work with rails 2.3. My plugin is based in engines. I'm doing good so far, the only problem is with helpers. Rails seems not to recognize helpers from my plugin. Anyone ran into this issue? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 Upgrade Issue with MemCache
One of the plugins I use is Workling. It throws the following error when I try to run it under 2.3: /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/ dependencies.rb:443:in `load_missing_constant': uninitialized constant MemCache (NameError) The offending line is: @@memcache_client_class ||= ::MemCache I don't know a lot about memcache, so I'm not sure what changed with 2.3 that could cause the error. Anyone have some ideas? Thanks! Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 deleting sessions
The following line no longer works in 2.3: ActiveRecord::SessionStore.delete_all ['updated_at < ?', 24.hours.ago] Does anyone know how to do this in 2.3? Thanks, Jay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3, restful_authentication, and passenger
I can no longer login using the latest passenger + Rails 2.3 with the restful_authentication plugin. If I run a quick "script/server" everything is fine. Anyone else having trouble with this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] rails 2.3 test failure - is this all it takes?
On Wed, Mar 4, 2009 at 9:14 PM, Richard Lloyd wrote: > Conrad, > > I just commented out line 10 from > activesupport-2.3.0/lib/activesupport/test_case.rb and the test ran to > completion. > > Rick > Hi Rick, I would recommend following this tutorial for contributing fixes to the Rails project because Ryan Bates does a wonderful job: http://railscasts.com/episodes/113-contributing-to-rails-with-git In this screenast, Ryan Bates walks through the entire process: a) cloning rails b) testing the part of the framework that you're interested in (i.e. activesupport in your case) before fixing and/or enhancing c) if (b) passes, then your fix isn't necessary. Otherwise, continue to (d) d) create a separate branch for you fix e) create the relevant test by adding it to the relevant test file or creating a new one test file for it f) execute the test file and it should produce the failure g) edit the relevant source file h) rerun the test from (e) i) add documentation to the source file in (g) j) commit the changes k) perform a 'git pull' on the master branch l) checkout your branch from (d) m) add your changes to the last commit that was made by executing 'git rebase master' n) generate the patch o) submit a ticket to lighthouse with a title, description, and relevant tags. Then attach your patch from (n) to the ticket and submit it. Last but not least, the Rails core group can be found here: http://groups.google.com/group/rubyonrails-core Good luck, -Conrad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Rails 2.3 problem...
When moving to Rails 2.3.0RC1 I get an error with concat!? I can't figure it out. See the dump below: ActionView::TemplateError (You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.<<) on line #158 of app/views/places/show.html.erb: 158: 159: <%= "What do you think about '%s'?" / @place %> 160: <% end -%> 161: <% form_for([...@place, @review = Review.new]) do |f| %> actionpack (2.3.0) lib/action_view/helpers/text_helper.rb:32:in `concat' actionpack (2.3.0) lib/action_view/helpers/form_helper.rb:252:in `form_for' app/views/places/show.html.erb:158 Any help is greatly appreciated! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---