This file contains 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
Umbrella.ShowProjectView = Ember.ContainerView.extend | |
classNames: ['projects_show', 'row'] | |
contentBinding: 'controller' | |
childViews: ['projectImagesIndexView'] | |
projectImagesIndexView: Ember.ContainerView.create | |
contentBinding: 'controller.projectImages' | |
childViews:[Umbrella.ProjectSlideshowView.create()] |
This file contains 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
Umbrella.Router = Ember.Router.extend | |
enableLogging: true | |
root: Ember.Route.extend | |
index: Ember.Route.extend | |
route: '/' | |
redirectsTo: 'projects' | |
projects: Ember.Route.extend |
This file contains 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
Umbrella.NewProjectDiscussionView = Ember.View.extend | |
contentBinding: 'controller' | |
tagName: 'form' | |
templateName: 'project_discussions/new' | |
submit: -> | |
Umbrella.store.createRecord Umbrella.ProjectDiscussion, | |
body: this.get('body') | |
project: this.get('content').objectAt('0').get('project') | |
Umbrella.store.commit() |
This file contains 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
Umbrella.ProjectSlideshowView = Ember.CollectionView.extend | |
tagName: 'ol' | |
contentBinding: 'controller' | |
classNames: ['project_carousel'] | |
itemViewClass: Ember.View.extend | |
templateName: 'projects/slideshow' |
This file contains 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
Umbrella.router = Ember.Router.create({ | |
root: Ember.State.extend({ | |
setupControllers: function (router) { | |
alert('bang') | |
} | |
}) | |
}); | |
Umbrella.initialize(Umbrella.router); |
This file contains 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
1 min: | |
~Painless Javascript | |
koting hatduklgg | |
with wind tunnel | |
~tenderlove.dup jremsikjr | |
~iwanttolearnruby.com | |
(collecting resources for learning ruby) |
This file contains 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
git clone git@github.com:shwoodard/facebox-rails.git | |
cd facebox-rails | |
bundle | |
rspec | |
rm -rf app/assets | |
rspec | |
(should fail) |
This file contains 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
# pseudo code | |
MyApplication.routes do | |
resources :orders do | |
resource :products do | |
end | |
end | |
end |
This file contains 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
diff --git a/app/controllers/business/pages_controller.rb b/app/controllers/business/pages_controller.rb | |
index cd23804..ae4b805 100644 | |
--- a/app/controllers/business/pages_controller.rb | |
+++ b/app/controllers/business/pages_controller.rb | |
@@ -33,6 +33,7 @@ class Business::PagesController < Business::BusinessController | |
end | |
def edit | |
+ @social_app = SocialApp.default_app unless @page.published? | |
if params[:iframe] |
This file contains 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 get_descriptor(descriptor, descriptor_keys = Rails.env, i = 0) | |
if descriptor.is_a?(Array) || descriptor.is_a?(String) | |
descriptor | |
elsif descriptor.is_a?(Hash) | |
if descriptor_keys.is_a?(Array) | |
get_descriptor(descriptor[descriptor_keys[i]], descriptor_keys, i + 1) | |
else | |
descriptor[descriptor_keys] | |
end | |
end |