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
| object(nil) | |
| node(:total){ @comments.total_entries } | |
| node(:page){ @comments.page } | |
| node(:per_page){ @comments.per_page } | |
| child(@comments => :items) do | |
| extends 'comments/base' | |
| end |
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
| ## Initial request / response, appcache is outdated so second request won't use cached page but will re-request it. | |
| Processing by Mobile::PhotosController#show as HTML | |
| Parameters: {"id"=>"1052"} | |
| ... | |
| Rendered text template within layouts/mobile (0.0ms) | |
| Completed 200 OK in 49ms (Views: 33.0ms | ActiveRecord: 3.1ms | Sphinx: 0.0ms) |
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
| { | |
| "status": <%= response.status %>, | |
| <% if @error %>"error": <%= @error.to_json.html_safe %>,<% end %> | |
| "version": "<%= version(yield) %>", | |
| "template": "<%= controller.controller_name %>-<%= controller.action_name %>", | |
| "result": <%= yield %> | |
| } |
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
| render(:template=>'base/header', :formats=>[:mustache], :handlers=>[:erb]) | |
| ## ActionView::Template::Error (Missing template base/header with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :rabl, :rjs]} |
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
| def fetch(col) | |
| t = self.class.arel_table | |
| ar = t.project(t[col]).where(t[:id].eq(id)) | |
| self.class.uncached do | |
| self.class.connection.select_value(ar.to_sql) | |
| end | |
| end |
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
| collection @photos | |
| extends 'photos/show' | |
| node(:src){|photo| photo.src(:thumb) } |
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
| module MobileApi | |
| def self.included(base) | |
| base.extend ClassMethods | |
| end | |
| class ClassMethods | |
| def mobile_api(*args) | |
| opts = args.extract_options! | |
| self.class_eval do |
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
| /photos/:id/in/:collection_with_delim | |
| ## /photos/123/in/category-landscapes | |
| /photos/:id/in/:collection/:collection_id | |
| ## /photos/123/in/category/landscapes |
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
| resources :photos | |
| ## Results in standard restful routes, including | |
| ## photo GET /photos/:id(.:format) photos#show | |
| match '/photos/:id(/in/:collection)' => 'photos#show', :via=>:get, :as=>'photo' | |
| ## Overrides old photo_path with | |
| ## photo GET /photos/:id(/in/:collection)(.:format) photos#show |
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
| Sass.compile(render :template=>'../assets/stylesheets/theme.css.scss').html_safe |