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
after_create { |admin| admin.send_reset_password_instructions } | |
def password_required? | |
new_record? ? false : super | |
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
<%= form_for :vehicle_listing_images, :html => { :multipart => true } do |f| %> | |
<%= hidden_field_tag :listing_id, @listing_id %> | |
<div id="file_upload_area"> | |
</div> | |
<% end %> | |
<div id="image-container"> | |
<button id="primary_photo" class="btn right"><strong>Select Primary photo</strong></button> | |
<input type="hidden" name="vehicle_listing[primary_photo_id]" value="<%= @listing.primary_photo_id %>" id="primary_photo_id" /> | |
<ul id="images"> |
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
require 'csv' | |
class ListingsController < ApplicationController | |
before_filter :login_required, :except => [:show, :index] | |
def index | |
@listings = session[:map_fields][:mapped_headers] | |
end | |
def new | |
@listing = Listing.new |
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 new | |
end | |
def create | |
user = User.authenticate(params[:login], params[:password]) | |
if user | |
session[:user_id] = user.id | |
redirect_to_target_or_default root_url, :notice => "Logged in successfully." | |
else | |
flash.now[:alert] = "Invalid login or password." |
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
= f.input :mapping_#{somehow_indicate_this_is_@import_header[0]}, :as => :select, :collection => @mdm_defaults | |
%span= import_headers |
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
E194: No alternate file name to substitute for '#': :r!echo '* {^@ padding: 0px;^@ margin: 0px;^@}^@^@html {^@ background: white;^@}^@* {^@ padding: 0px;^ | |
@ margin: 0px;^@}^@^@html {^@ background: white;^@}^@^@body {^@ font: 13pt "Myriad Pro", Helvetica;^@ margin: 5px 10app/assets/stylesheets/partials/_page. | |
scss 0px 10app/assets/stylesheets/partials/_page.scss;^@ height: 100app/assets/stylesheets/partials/_page.scss;^@ padding: 30px;^@ -moz-border-radius: 3px; | |
^@ -webkit-border-radius: 3px;^@}^@^@h1 {^@ margin-bottom: 20px;^@}^@^@nav {^@ margin: 10px 0px 10px 0px;^@}^@^@a {^@ color: #74CC00;^@}^@^@textarea {^@ | |
padding: 3px;^@ margin-top: 5px;^@ margin-bottom: 5px;^@}^@^@input[type=file] {^@ margin-top: 10px;^@ margin-bottom: 10px;^@}^@^@.flash {^@ padding: 10px | |
;^@ -moz-border-radius: 10px;^@ -webkit-border-radius: 10px;^@ font-weight: bold;^@}^@^@#notice {^@ background: #85FF00;^@ color: black;^@}^@^@#alert {^@ | |
background: #FF3444;^@}^@^@ul#tickets {^@ padding: 15px;^@ list-st |
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
"" * {^J padding: 0px;^J margin: 0px;^J}^J^Jhtml {^J background: white;^J} | |
"0 * {^J padding: 0px;^J margin: 0px;^J}^J^Jhtml {^J background: white;^J} | |
"1 colorscheme solarized^J | |
"2 ^J | |
"3 let g:solarized_termcolors=256^J set t_Co=16^J set background=dark | |
"4 ) | |
"5 true | | |
"6 unconfirmed | | |
"7 alse | |
"8 if |
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
var staffs = new Array(); | |
var staff_to_services = new Array(); | |
var arr = new Array(); | |
staffs.push( new Array(null, 'Choose a staff member', null) ); | |
staffs.push( new Array(0, 'Any', 0) ); |
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
Feature: Signing in | |
In order to use the site | |
As a user | |
I want to be able to sign in | |
Scenario: Signing in via confirmation | |
Given there are the following users: | |
| email | password | unconfirmed | | |
| [email protected] | password | true | | |
And "[email protected]" opens the email with subject "Confirmation instructions" |
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
require File.expand_path('../boot', __FILE__) | |
require 'rails/application' | |
require 'rails/engine' | |
module Rails | |
class Application < Engine | |
def initializers | |
init = Bootstrap.initializers_for(self) #BOOTSTRAP | |
init += super #RAILTIES | |
init += Finisher.initializers_for(self) #FINISHER |