In R.O.R., the code show below, in a 'list.rhtml' view will make the 'title' field from the 'recipes' table a 'clickable' link .... (directly instead of having the separate 'edit' link).
Is there equivalent code in Akelos ? : (and what is it ? :) )
(Bermi, since you are obviously quite proficient with programming, an interesting challenge for you might be to write a R.O.R. -> Akelos "translator" for the script/console, where a user could type in a ROR "idiom" as above and get the Akelos format !) ;)
Mike
<%= link_to %Q{#{recipe.title}}, :action => 'edit', :id => recipe
Mike,
<%= link_to recipe.title, :action => 'edit', :id => recipe %>
or
<%= link_to "#{recipe.title}", {:action => 'edit', :id => recipe} %>
works on Akelos views :D, just try it out.
The Ruby > PHP conversion challenge is already done at some extent. Adding it to the console is just a matter of parsing incoming commands through the AkSintags parser, and that is not on the top of my list of priorities, but it might be a suitable challenge for other community member. Anyone interested?
You need to change this
<td><%= link_to author.name, :action => 'edit', :id => author %></td>
with
<td><%= link_to author.name, :action => 'edit', :id => author.id %></td>
as url_for does not extracts automatically the AR :id like in RoR
1 to 6 of 6