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
source 'https://rubygems.org' | |
gem 'rails', '3.2.14' | |
gem 'pg' | |
group :assets do | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'coffee-rails', '~> 3.2.1' | |
gem 'therubyracer', :platforms => :ruby | |
gem 'uglifier', '>= 1.0.3' | |
gem 'less-rails' |
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
NoMethodError in Spree/admin/stock_locations#index | |
Showing /home/david/.rvm/gems/ruby-1.9.3-p392/bundler/gems/spree-fea90fb7fb24/backend/app/views/spree/admin/stock_locations/index.html.erb where line #40 raised: | |
undefined method `admin_name' for #<Spree::StockLocation:0x007fe7846c1178> | |
Extracted source (around line #40): | |
37: @delete_url = admin_stock_location_path(stock_location) | |
38: %> | |
39: <tr id="<%= spree_dom_id stock_location %>" data-hook="stock_location_row" class="<%= cycle('odd', 'even')%>"> |
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
<div id="prior_cancer_history"> | |
<% @medical_family_history.prior_cancer_histories.each_with_index do |prior_cancer_history, i| %> | |
<%= f.fields_for :prior_cancer_histories, prior_cancer_history do |f| %> | |
<%= javascript_tag(build_row(render_to_string('prior_cancer_history_fields', :f => f, :i => i), i)) %> | |
<% end %> | |
<% end %> | |
</div> |
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
require 'active_record' | |
module SaveAsDraft | |
ActiveRecord::Base.class_eval do | |
alias_method :save_without_draft, :save | |
def save_with_draft | |
if self.has_attribute?(:record_status) and self.record_status == "Draft" | |
save_without_draft(:validate => false) | |
else |
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
class ActiveRecord::Base | |
module SaveAsDraft | |
def save | |
if self.has_attribute?(:record_status) and self.record_status == "Draft" | |
super(:validate => false) | |
else | |
super | |
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
class ActiveRecord::Base | |
module SaveAsDraft | |
def save | |
if self.has_attribute?(:record_status) and self.record_status == "Draft" | |
super(:validate => false) | |
else | |
super | |
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
Dev: | |
ActionView::Helpers::UrlHelper WAS INCLUDED IN ActionView::Helpers::FormTagHelper! | |
ActionView::Helpers::UrlHelper WAS INCLUDED IN ActionView::Helpers::FormHelper! | |
ActionView::Helpers::UrlHelper WAS INCLUDED IN ActionView::Helpers::InstanceTag! | |
ActionView::Helpers::UrlHelper WAS INCLUDED IN ActionView::Helpers! | |
ActionView::Helpers::UrlHelper WAS INCLUDED IN ActionView::Base! | |
ActionView::Helpers::UrlHelper WAS INCLUDED IN ActionView::Base! | |
ActionView::Helpers::UrlHelper WAS INCLUDED IN ActionView::Base! |
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
Development: | |
[HomePagesController, ApplicationController, UrlHelper, ActionController::Base, Devise::Controllers::Helpers, TinyMCE::Base, TinyMCE::SpellChecker, #<Module:0x00000001eb2278>, ActionDispatch::Routing::Helpers, #<Module:0x00000002ac2950>, ActiveRecord::Railties::ControllerRuntime, Devise::Controllers::UrlHelpers, ActionController::Compatibility, ActionController::Rescue, ActiveSupport::Rescuable, ActionController::Instrumentation, ActionController::HttpAuthentication::Token::ControllerMethods, ActionController::HttpAuthentication::Digest::ControllerMethods, ActionController::HttpAuthentication::Basic::ControllerMethods, ActionController::RecordIdentifier, ActionController::Streaming, ActionController::RequestForgeryProtection, AbstractController::Callbacks, ActiveSupport::Callbacks, ActionController::Flash, ActionController::Cookies, ActionController::ImplicitRender, ActionController::MimeResponds, ActionController::Caching, ActionController::Caching::Fragments, ActionController::Caching::Config |
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
$(document).ready(function(){ | |
$('.init').click(function(event){ | |
$.getJSON("http://localhost:37280/sites/1/encode?callback=?", { key: $("#target").attr('value') }, function(data){ | |
alert(data); | |
}); | |
event.preventDefault(); | |
}); | |
}); |
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
ActionController::Routing::Routes.draw do |map| | |
map.resources :user_sessions | |
map.resources :sites, :users | |
map.resources :sites, :member => { :encode => :get, :decode => :get } | |
map.login "login", :controller => "user_sessions", :action => "new" | |
map.logout "logout", :controller => "user_sessions", :action => "destroy" | |
map.root :login |