什么是在rails 3中设置页面标题的正确方法.目前我正在做以下事情:
应用程序/视图/布局/ application.html:
<head>
<title><%= render_title %></title>
<%= csrf_meta_tag %>
Run Code Online (Sandbox Code Playgroud)
应用程序/佣工/ application_helper.rb:
def render_title
return @title if defined?(@title)
"Generic Page Title"
end
Run Code Online (Sandbox Code Playgroud)
应用程序/控制器/ some_controller.rb:
def show
@title = "some custom page title"
end
Run Code Online (Sandbox Code Playgroud)
有没有其他/更好的方法来做上述事情?
如何在iPhone应用程序中添加图像过滤器?(类似于Instagram和picplz所拥有的)