-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grails create-app Creates a Grails application for the given name | |
grails create-domain-class Creates a new domain class | |
grails generate-all Generates a CRUD interface (controller + views) for a domain class | |
grails install-plugin Installs a plug-in for the given URL or name and version | |
grails create-controller Creates a new controller | |
grails interactive Starts Grails CLI (script runner) in interactive mode. | |
Keeps the JVM running between grails commands for faster script execution. | |
grails console Load the Grails interactive Swing console | |
grails run-app grails [environment]* run-app - Runs a Grails application |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autocmd BufRead,BufNewFile *_spec.rb | |
\ map ;t :w\|:!rspec --no-color %<cr> | |
autocmd BufRead,BufNewFile *_test.rb | |
\ map ;t :w\|:!ruby -Ilib %<cr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Fixnum | |
def ordinalize | |
if (11..13).include?(self % 100) | |
"#{self}th" | |
else | |
case self % 10 | |
when 1; "#{self}st" | |
when 2; "#{self}nd" | |
when 3; "#{self}rd" | |
else "#{self}th" |
-
Im reasonably happy to live with the method in the controller, unless you say otherwise.
-
I've looked in vain for an authorative answer for the 'neater syntax' part of this: If I wanted a categories controller with simpy a param[:id] for both URLs below, what would I write in routes.rb please? I reckon this involves writing two GET directives in a particular order in routes.rb, but is there a neater syntax?
GET /categories/:id/show_full categories#show_full
GET /categories/:id categories#show
- So I believe I'm doing three (N+1) queries to display that page. If I was concerned about performance (one day I will be) what lines of attack do I have to reduce a performance hit?
Thanks!