Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert undefined method `rewrite' for...

Replytotopic

undefined method `rewrite' for #<url:0xb75f2848>

Posted in Forums : Ask a Rails expert

 
Profile

Authority 37
Posting Rating 65
Sign in to rate this post

My controller is Url. when i execute its showing the error

undefined method `rewrite’ for #<url:0xb75f2848>

Its showing error in layout at line no. 27

27: <= link_to ‘Logout’, :controller => ‘login’, :action => ‘logout’ %>
28:
29: <
= url_for(:controller=> :upload,:action =>‘picture’,
30: :id => session[:user_id]) %> width=”100” height=”100”/>

 
Profile

Authority 62
Posting Rating 97
Sign in to rate this post

Hi

Try putting <%= after 27th and 29th line, as below

27: <= link_to ‘Logout’, :controller => ‘login’, :action => ‘logout’ %>

<=
28:
29: <= url_for(:controller=> :upload,:action =>‘picture’,
<
=

Hope this helps

Thanks

Replytotopic

Other Recent Topics

Ask a Rails expert : How to parse <pubdate> in RSS

Ask a Rails expert : Couldn't find Product without an ID

Ask a Rails expert : HTML to XML ---> get title & description

Ask a Rails expert : Accessing controller actions from scripted page?

Ask a Rails expert : seledted option for select_tag

Ask a Rails expert : Merging fields from two tables into one, including duplicates

Ask a Rails expert : saving has_many :through

Ask a Rails expert : Use Rails to develop sites for both Designer and Programmer

Ask a Rails expert : Rails+RS232

Ask a Rails expert : Is this a good way to add Admin section

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel