search for: my_view

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

Did you mean: matview
2006 May 08
17
partial problem
def my_controller @variable = [{''myfield''=>''grey''},{''myfield''=>''blue''}] end #-------------------------my_view <table> <%= render :partial=>''my_partial, :collection=>@variable %> </table> #----------------------_my_partial <tr> <td><%= my_partial[''myfield''] %> </td> </tr> I would have expected the view to print out grey, blu...
2008 May 11
3
Get current controller name/action name from view
...in the group or elsewhere online! In a view I would like to get the current controller name and action that was used to get here. For example, I have a template that I''m using from two different controllers (and four different actions in each controller), such as :controller => "my_view", :action => "current" (or "expired", or "fixed", etc.) In this template I''m constructing some links to specific parameter calls of this same template, and I need to know which controller was used and what action was called to get us here. I thought...
2013 Feb 05
3
Truncate text
Hi Folks, Good evening, I used the code which i print below, Yes i got the result , but i need the result like this "TruncateHtml is jus....(continued)" some_html = ''<ul><li><a href="http://whatever">TruncateHtml is just like the vanilla truncate rails helper , TruncateHtml is just like the vanilla truncate rails
2007 Jun 18
0
Problem with belongs_to associations validating associated class: bug in rails in development mode?
...key => :viewer_id And of course i have a User model class defined to. The problem was that when i tried to use this association it would only work once. At the second try, i would get the following strange error: ActiveRecord::AssociationTypeMismatch : User expected, got User On a call to: my_view.viewer = my_user After a little investigation i found that the problem was related to this option in the environments/development.rb config.cache_classes = false If I changed this option to true, everything would work ok. The problem is that the associated proxy is caching the associated class,...