Hi, I’m new to Rails but I develop in PHP somtimes. I figured that the
best way to learn Rails is to create a simple CMS. While I understand
the basics of ruby and rails, one issue has caught me: how can I set a
default ID for an action?
Here is my code for the index action in my pages controller:
def index
@page = Page.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @page }
end