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
# Sample localization file for English. Add more files in this directory for other locales. | |
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. | |
en: | |
hello: "Hello world" | |
mailboxer: | |
message_mailer: | |
subject_new: "new %{type} from %{sender}" | |
subject_reply: "new %{type} from %{sender}" | |
en: |
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 index | |
if params["rawdenim"] | |
params["raw denim"] = params["rawdenim"] | |
end | |
if params[:gotouser] == "yes" | |
if current_user | |
redirect_to user_path(current_user.id) | |
end | |
end | |
@perpage = 60 |
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
# params[:category] is an array of categories like ['tops, 'bottoms', 'outerwear']. | |
# For each category I have a corresponding array of sizes like ['M', 'L']. | |
# params[category] gives the sizes for the category. | |
#I want to return the given sizes in each category so I've created this loop. | |
# However I don't know how to merge the queries together. I think I'm supposed to use .merge but I'm not sure what to define @listings as so I can call .merge on it in the loop. | |
@listings = [] | |
params[:category].each do |category| | |
@listings += Listing.where(category: category, size: params[category], designer: params[:designer], sold: nil).include(:photos).page(params[:category_page]).per(@perpage) |
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
@font-face { | |
font-family: "SackersGothicStd-Light"; | |
src: url('<%= asset_path('SackersGothicStd-Light.otf') %>'); | |
} |
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
en: | |
hello: "Hello world" | |
mailboxer: | |
message_mailer: | |
subject_new: "Sartorialis - %{sender}" | |
subject_reply: "Sartorialis - %{sender}" |
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
submitHandler: function(form) { | |
jQuery.facebox({ div: '#loading' }); | |
form.submit(); | |
} |
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
NoMethodError in ListingsController#update | |
private method `update' called for #<Listing:0x007fc33f857e60> | |
Rails.root: /Users/arungupta/sartorialis | |
Application Trace | Framework Trace | Full Trace | |
app/controllers/listings_controller.rb:46:in `block in update' | |
app/controllers/listings_controller.rb:45:in `update' | |
Request |
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
jQuery -> | |
$(document).on "click",'.pagination a[data-remote=true]', (e) -> | |
history.replaceState {}, '', $(@).attr('href') |
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
# encoding: utf-8 | |
class ImageUploader < CarrierWave::Uploader::Base | |
# Include RMagick or MiniMagick support: | |
# include CarrierWave::RMagick | |
include CarrierWave::MiniMagick | |
# Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility: | |
# include Sprockets::Helpers::RailsHelper |
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
$(".saved-cc-button").click(function () { | |
$("#savedpayer").hide(); | |
$("#paying").show(); | |
$.ajax({ | |
type: 'POST', | |
url: '/stripe', | |
data: { loggedinid : <%= current_user.id %> }, | |
headers: { | |
'X-Transaction': 'POST Example', | |
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') |