Last active
August 29, 2015 14:05
-
-
Save sarony/90d87f24f3839819ca63 to your computer and use it in GitHub Desktop.
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
// migration.rb | |
class AddTransactionsToRsvp < ActiveRecord::Migration | |
def change | |
add_column :rsvps, :transactions, :string, array: true, default: [] | |
end | |
end | |
// gig_post_helper.rb | |
def duration_tag_collection | |
GigPost::DURATION_TAGS.each_with_index.collect { |tag, index| [tag, tag.gsub(" ", "_")] } | |
end | |
// view/new_gig_post.html.erb | |
<%= select_tag("tags[duration]", options_for_select(duration_tag_collection), :prompt => "-- pick a duration --") %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment