I hereby claim:
- I am derekrockwell on github.
- I am derekrockwell (https://keybase.io/derekrockwell) on keybase.
- I have a public key ASDsJ7SwLK461I1nwwX1qb-KCXtqhzitJEUxEZksyoTVYAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class User < ActiveRecord::Base | |
#magically looks up repertoires with user_id = this user's id | |
has_many :repertoires | |
end | |
class Repertoire < ActiveRecord::Base | |
#songly data and methods | |
#requires user_id integer on repertoire table | |
belongs_to :user | |
end |
module DummyEngine | |
module ApplicationHelper | |
def method_missing(method, *args, &block) | |
if (method.to_s.end_with?('_path') || method.to_s.end_with?('_url')) && engine_name.respond_to?(method) | |
engine_name.send(method, *args) | |
else | |
super | |
end | |
end | |
end |
MyApp::Application.config.secret_token = if Rails.env.development? or Rails.env.test? | |
('x' * 30) # meets minimum requirement of 30 chars long | |
else | |
ENV['SECRET_TOKEN'] | |
end |
module MetaSearch | |
module Helpers | |
module FormHelper | |
def apply_form_for_options!(record,object,options) | |
if object.is_a?(MetaSearch::Builder) | |
builder = object | |
options[:url] ||= polymorphic_path(object.base) | |
elsif object.is_a?(Array) && (builder = object.detect {|o| o.is_a?(MetaSearch::Builder)}) | |
options[:url] ||= polymorphic_path(object.map {|o| o.is_a?(MetaSearch::Builder) ? o.base : o}) | |
else |
<%= form_tag('/sample') do |f| %> | |
<div class="field"> | |
<%= label_tag :var1 %><br /> | |
<%= text_field_tag :var1 %> | |
</div> | |
<div class="field"> | |
<%= label_tag :var2 %><br /> | |
<%= text_field_tag :var2 %> | |
</div> | |
<div class="actions"> |