[Rails] Routing Issue

2011-01-18 Thread tonymocha
Hi While I try to create a form with named routes: <% form_for @post,:url=>admin_post_path(@post) do |f| -%> The form action returns "/admin/post.1", as I expect it to be "/admin/ post/1". Is this a bug or I configured it wrongly? Appreciate your advice -- You received this message because y

[Rails] Re: Problems with parsing params for Active Record

2010-05-24 Thread tonymocha
this funny issue. I try this > > on rails console too, it is the same result. > > > On May 25, 2:49 am, Frederick Cheung > > wrote: > > > > On May 24, 6:01 pm, tonymocha wrote: > > > > > Hi, > > > > > I have come into an odd pr

[Rails] Problems with parsing params for Active Record

2010-05-24 Thread tonymocha
Hi, I have come into an odd problem that I couldn't figure out why. Basically, what I did is to save a record from the form, but there's some field that parsed to the active record returns as nil. Example: article = Article.new({"title"=>"halo world","content"=>"lorem ipsum", "tags"=>"test,artic

[Rails] Problem in loading images from external site

2009-08-04 Thread tonymocha
I am trying to load an external image from other website in my rails app. With following syntax: <%= image_tag('http://www.google.com/intl/en_com/images/ logo_plain.png' %> It only display the text, but not the images itself. I try to load the image through plain html and it is working fine. It

[Rails] Hitting unknown error with "can't dup NilClass"

2009-07-20 Thread tonymocha
Hi, My system has been encounter this problem, and I couldn't find solution after debugging. My scenario is stated below: class user has_many :posts has_many :comments end class post belongs_to :user has_many :comments, :as => :commentable end class comment belongs_to :post belon