Prev | Current Page 143 | Next

David Berube

"Practical Reporting with Ruby and Rails"

It does contain one important line:
<%=javascript_include_tag :defaults %>
This includes the default list of JavaScript files, which includes Prototype by default.
Because the Flash Object plug-in adds itself to the list of defaults, this line also includes
the Flash Object plug-in for you.
nNote You need Prototype, as it??™s used later in this example. However, if you need to include Flash Object
by itself, you can use this line of code: <%= javascript_include_tag "flashobject" %>.
Next, let??™s examine the config/routes.rb file (Listing 5-10), which controls the URLs
for the entire application:
ActionController::Routing::Routes.draw do |map|
map.connect 'performance/:game_id/:player_id',
:controller=>'performance',
:action=>'show'
map.connect 'performance/:game_id/:player_id.:format',
:controller=>'performance',
:action=>'show'
map.connect "/", :controller=>'home'
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
The first route is a route that defines URLs of the form performance/game_id/
player_id.


Pages:
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
pokrowce na krzesła Warszawa mieszkania Nowhere trip biura rachunkowe nieruchomości w Świętochłowicach