Interesting Things
- Mac folks: if you edit your environment.plist, you have to log out, then log back in for the changes to take effect.
- Rails FYI: if you have an RHTML and a RJS template with the same name, by default the RHTML template will be rendered unless the RJS is explicitly called. Example:
<code>
# Project structure
app/
views/
users/
account.rhtml # will be rendered by default
account.rjs
profile.rhtml # will be rendered by default
profile.rjs
</code>Both “account” and “profile” have RHTML and RJS templates. The following code will dictate which is rendered.
<code>
class UsersController
def account
# account.rhtml will be rendered by default
end
def profile
# explicitly render the render the RJS template
render :template => "users/profile.rjs"
end
end
</code>