@public_documents = @documents.map { |document| document.to_hash }
Ruby Call a function to each member
by sebastian.deutsch.myopenid.com,
September 08, 2009 16:14,
4 refactorings, tagged with rails, ruby
@team.statements.scoped({
:select => "statements.*, users.first_name",
:joins => "INNER JOIN users ON users.id = statements.user_id",
...
Ruby Named Scopes in Relations
by sebastian.deutsch.myopenid.com,
June 24, 2009 15:38,
2 refactorings, tagged with rails named_scope relation
I have two models: Teams an...
def schema raw_schema_json = ActiveSupport::JSON.decode(self.schema_json) schema = [] ...
Ruby Decoding a json object whil...
by sebastian.deutsch.myopenid.com,
June 10, 2009 18:01,
3 refactorings, tagged with rails, ruby, json
I'm decoding a json object....
$('.answer_filter').change(function() {
var filter = jQuery(this);
var select = jQuery('#' + filter.get(0).id); // @TODO find a more appropriate solution
...
JavaScript Get the id of a <select&...
by sebastian.deutsch.myopenid.com,
January 27, 2009 17:19,
3 refactorings, tagged with javascript, jquery, select
I get a change event within...
category_id = category_name.scan(/category-(\d+)/)[0][0]
Ruby Ugly RegEx Accessor
I try to extract an id from...
Is there a shorter version,...