25 Sep '13, 9pm

just learnt: you can't overwrite an .order in ActiveRecord, you need to call .reorder

Replaces any existing order defined on the relation with the specified order . User . order (' email DESC '). reorder (' id ASC ') # generated SQL has 'ORDER BY id ASC' Subsequent calls to order on the same relation will be appended. For example: User . order (' email DESC '). reorder (' id ASC '). order (' name ASC ') generates a query with ‘ORDER BY id ASC, name ASC’. Show source # File activerecord/lib/active_record/relation/query_methods.rb, line 106 def reorder (* args ) return self if args . blank? relation = clone relation . reordering_value = true relation . order_values = args . flatten relation end

Full article: http://apidock.com/rails/ActiveRecord/QueryMethods/reorder


“ActionController::Streaming - APIdock”

apidock.com 06 Oct '13, 12pm

This means that, if you have yield :title in your layout and you want to use streaming, you would have to render the whole...

@andrzejkrzywda you can call .except(:order) on...

apidock.com 25 Sep '13, 9pm

Removes from the query the condition(s) specified in skips . Example: Post . order (' id asc '). except ( :order ) # disca...



ecotricity.co.uk 25 Sep '13, 12pm

Dale Vince: We need to repatriate energy bills 25 September 2013 Ecotricity founder Dale Vince today called for Ed Miliban...