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
| class Boat < ActiveRecord::Base | |
| validates :name, presence: true, uniqueness: { case_sensitive: false } | |
| has_many :tech_specs, order: 'position' | |
| def visible? | |
| self.visible | |
| end | |
| 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_tag([:edit, :admin, @tech_spec.boat, @tech_spec], method: :get) do %> | |
| <%= select_tag(:translation, | |
| options_from_collection_for_select(@translations, | |
| :first, | |
| :last, | |
| @translation)) %> | |
| <%= submit_tag('Go to this translation') %> | |
| <% 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
| doctype html | |
| html lang==I18n.locale | |
| head | |
| meta http-equiv="X-UA-Compatible" content="IE=edge" | |
| meta charset="utf-8" | |
| meta name="viewport" content="width=device-width, initial-scale=1.0" | |
| title | |
| = yield :title | |
| | | Austin Parker | |
| = yield :top_head |
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
| doctype html | |
| html lang==I18n.locale | |
| head | |
| meta http-equiv="X-UA-Compatible" content="IE=edge" | |
| meta charset="utf-8" | |
| meta name="viewport" content="width=device-width, initial-scale=1.0" | |
| title | |
| = yield :title | |
| | | Austin Parker | |
| = yield :top_head |
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
| module PrefixRoutesWithLocale | |
| module ActionController | |
| module BaseMethods | |
| def self.included(base) | |
| base.send :prepend_before_filter, :set_locale_from_prefix_or_suppose | |
| end | |
| protected |
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
| module PrefixRoutesWithLocale | |
| module ActionController | |
| module BaseMethods | |
| def default_url_options | |
| self.prefix_routes_with_locale_default_url_options.merge({locale: I18n.locale}) | |
| end | |
| end | |
| 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
| 1) Boat when logged in as admin GET /admin/boats displays boats | |
| Screenshot: /mnt/hgfs/d_wamp_www/austin/austinparker_it/tmp/capybara/screenshot_2013-03-16-18-09-16.391.png | |
| Failure/Error: boat = FactoryGirl.create(:boat) | |
| NoMethodError: | |
| undefined method `short_description=' for #<Boat:0x00000006965f40> | |
| # ./spec/features/boats_spec.rb:14:in `block (4 levels) in <top (required)>' |
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
| a.button-icon:hover > div, .button-icon.inactive > div | |
| { | |
| // background-image: image-url('layouts/client/boat-button-hover.png'); | |
| @include background-image(linear-gradient(bottom, | |
| rgba(153,204,255,.93), | |
| #181818)); | |
| background-image: -ms-linear-gradient(bottom, rgba(153,204,255,.93), #181818); | |
| color: $blueLight; | |
| } |
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
| Failures: | |
| 1) Boat visible can be if there are less than 7 boats visible | |
| Screenshot: /mnt/hgfs/d_wamp_www/austin/austinparker_it/tmp/capybara/screenshot_2013-03-17-01-43-15.348.png | |
| Failure/Error: FactoryGirl.create(:boat).should be_valid | |
| expected #<Boat id: 8, name: "Jarrod", created_at: "2013-03-17 00:43:15", updated_at: "2013-03-17 00:43:15", visible: true, short_description: "Velit eligendi sint voluptatem temporibus est fugit...", description: "Cupiditate maiores voluptatem quibusdam. Inventore ..."> to be valid, but got errors: Visible slots available only if visible? There are already 7 over 7 | |
| # ./spec/models/boat_spec.rb:62:in `block (3 levels) in <top (required)>' | |
| Finished in 1.92 seconds | |
| 10 examples, 1 failure |