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
| %h1 HAML | |
| #main_wrapper | |
| .left_column | |
| - if @clients.any? | |
| = render @clients | |
| - else | |
| No clients available | |
| .right_column= render :partial => “menu” |
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
| <h1>PLAIN HTML</h1> | |
| <div id="main_wrapper"> | |
| <div class="left_column"> | |
| <% if @clients.any? %> | |
| <%= render @clients %> | |
| <% else %> | |
| No clients available | |
| <% end %> | |
| </div> | |
| <div class="right_column"> |
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
| @mixin table-base | |
| th | |
| text-align: center | |
| font-weight: bold | |
| td, th | |
| padding: 2px | |
| @mixin left($dist) | |
| float: left | |
| margin-left: $dist |
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
| MyApp::Application.routes.draw do | |
| root :to => "frontend#index" | |
| namespace :api do | |
| resources :users | |
| resources :clients | |
| end | |
| match 'photos/:id' => 'photos#show' | |
| 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
| class MasterCrm.Views.Organization.Index extends Backbone.View | |
| initialize: -> | |
| @collection = new MasterCrm.Collections.Users() | |
| @collection.on("reset change", @render_collection, this) | |
| @collection.on "add", @append_element, this | |
| $.fancybox.showActivity() | |
| @collection.fetch() | |
| @render() | |
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
| before_validation :set_default_time | |
| def set_default_time | |
| self.start_date ||= Time.now.beginning_of_day | |
| self.end_date ||= Time.now.end_of_day | |
| 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
| clients = Client.limit(10) | |
| clients.each do |client| | |
| puts client.address.postcode | |
| 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
| def index | |
| if stale?(:last_modified => @clients.maximum("updated_at"), :etag => @clients) | |
| respond_with @clients.as_json(:methods => [:emails_count, :phones_count, :communications_count]) | |
| end | |
| end | |
| def show | |
| if stale?(@client) | |
| respond_with @client.to_json(:include => { | |
| :emails => {:limit => 10}, |
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 touch | |
| @user.touch | |
| render :json => {"status" => "touched"} | |
| 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
| config.json | |
| reading-image.png |
OlderNewer