search for: berditchevskiy

Displaying 4 results from an estimated 4 matches for "berditchevskiy".

2006 Feb 01
4
Where is the send() function?
Hi, in the tutorial "4 Days on Rails" the following code fragment is used: ,---- | <% for column in Category.content_columns %> | <td><%=h category.send(column.name) %></td> | <% end %> `---- Apparently, the send() function returns the column value by name, but where does this function comes from? Unfortunately, neither the tutorial nor the API
2006 Jun 08
5
Field names in validators
Hi! Is there a (simple) way to use alternative field names in validation messages? For example, if I have a validator like this one: validates_presence_of :email how can I make it print a message like "E-Mail Address can''t be blank" instead of "Email can''t be blank"? I can override the "can''t be blank" part by using the :message
2006 Jul 12
3
How to get the current URL?
Hi, how can I get the current URL withing a controller? There seems to be no appropriate method in ActionController::Base. I''m creating a site, which requires a login for some pages. I''m using before_filter for authentication. My idea was to store the currect URL in a session before redirecting to the login page and then redirect to this URL after successful authenfication.
2006 Mar 12
2
Strange error: undefined method `rewrite''
Hi, when I generate a new rails project with a simple scaffolded controller, I get a strange error message, whenever it tries to call the url_for method, for example: ,---- | undefined method `rewrite'' for #<Url:0xb7675e64> | | Extracted source (around line #7): | | 4: </p> | 5: <% end %> | 6: | 7: <%= link_to ''Edit'', :action =>