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 Carousel < ActiveRecord::Base | |
| validates_presence_of [:alternate_text, :destination_url] | |
| validates_attachment_presence :image | |
| 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
| <% if params[:action] == "edit" | |
| post_path = admin_carousel_path(:id => @carousel.id) | |
| else | |
| post_path = admin_carousel_index_path | |
| end | |
| %> | |
| <% form_for(@carousel, :url => post_path, :html => {:multipart => true}) do |f| %> | |
| <p> | |
| <%= f.error_messages %> |
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
| Given /^a user is logged in as "(.*)"$/ do |email| | |
| visit "/users/sign_up" | |
| fill_in("Business email", :with => email) | |
| fill_in("Password", :with => '123123') | |
| fill_in("Password confirmation", :with => '123123') | |
| fill_in("Name", :with => 'Tester Wester') | |
| fill_in("Home number", :with => '12341234') | |
| fill_in("Business number", :with => '23451234') | |
| fill_in("Mobile number", :with => '55555555') | |
| fill_in("Personal email", :with => 'some@gmail.com') |
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
| pma:~ pma$ ssh pma@localhost env | |
| SHELL=/bin/bash | |
| SSH_CLIENT=::1 57377 22 | |
| USER=pma | |
| MAIL=/var/mail/pma | |
| PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
| PWD=/Users/pma | |
| SHLVL=1 | |
| HOME=/Users/pma | |
| LOGNAME=pma |
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
| pma:.ssh pma$ ssh pma@localhost git-receive-pack | |
| /Users/pma/.rvm/scripts/rvm: line 7: syntax error near unexpected token `<' | |
| /Users/pma/.rvm/scripts/rvm: line 7: `grep -q '^rvm ()' < <( declare -f ) # Is RVM is a shell function?' | |
| bash: git-receive-pack: command not found |
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
| initializeFormSubmit: function() { | |
| this.formEl.addEvent('submit', function(e) { | |
| e.stop(); | |
| fixTiny({instance:'excerpt'}); | |
| fixTiny({instance:'body'}); | |
| this.formEl.set('send', { | |
| onComplete : this.clearFields() | |
| }); |
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
| Element.implement('setEvent', function(eventType, func) { | |
| var self = this; | |
| self | |
| .removeEvents(eventType) | |
| .addEvent('click', function(e) { | |
| e.stop(); | |
| func.bind(self)() | |
| }); | |
| }); |
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
| pma:chat pma$ mvn jetty:run | |
| [INFO] Scanning for projects... | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Building chat Project | |
| [INFO] task-segment: [jetty:run] | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Preparing jetty:run | |
| [INFO] [resources:resources {execution: default-resources}] | |
| [INFO] Using 'UTF-8' encoding to copy filtered resources. | |
| [INFO] Copying 2 resources |
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
| for i in 39..47 | |
| define_method:"size_#{i}_quantity" do | |
| if self.variants.find_by_size(i) | |
| self.variants.count_on_hand | |
| else | |
| 0 | |
| end | |
| 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
| def size_39_quantity | |
| if self.variants.find_by_size(39) | |
| self.variants.count_on_hand | |
| else | |
| 0 | |
| end | |
| end | |
| def size_40_quantity | |
| if self.variants.find_by_size(40) |