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
{"utf8"=>"✓", | |
"_method"=>"put", | |
"authenticity_token"=>"mwSXSnnkNo37wsC7juyHXTlCYKJRLRn1vr26+uiHYJs=", | |
"profile"=>{"username"=>"blah", | |
"email"=>"[email protected]", | |
"datingprofile_attributes"=>{"birthday(1i)"=>"1977", | |
"birthday(2i)"=>"12", | |
"birthday(3i)"=>"27", | |
"gender"=>"M", | |
"orientation"=>"", |
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
# index.html.haml | |
- if !@flags_profiles.empty? | |
= simple_form_for( f, remote: true, method: :put, url: admins_moderations_confirm_flag_path, html: { style: 'line-height: 1'} ) do |g| | |
= g.hidden_field :id, :value => f.id | |
= g.submit "Confirm Flag", html_options: {class: "moderate-photo-button", style: "color: green;"} | |
# routes.rb | |
namespace :admins do | |
resources :moderations | |
match 'moderations/confirm_flag' => 'moderations#confirm_flag', :via => :put |
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
/ layout (see last line) | |
!!! 5 | |
-html_tag class: "no-js", lang: "en" do | |
= render "head", stylesheet_partial: "stylesheets" | |
%body{ class: "#{controller.controller_name}" } | |
#wrapper | |
#main |
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
require 'minitest_helper' | |
describe "Home integration" do | |
it "has content" do | |
visit root_path | |
assert page.has_content?("Be the first to know") | |
end | |
it "is possible to log in and log out" do | |
provider = create(:provider) |
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
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require "minitest/autorun" | |
require "minitest/rails" | |
require "minitest/rails/capybara" | |
require "database_cleaner" | |
require "factory_girl" | |
require "carrierwave/test/matchers" |
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
# In model: | |
STATUS_CHOICES = { | |
default: "Ask me", | |
single: "Single", | |
relationship: "Relationship", | |
married: "Married", | |
divorced: "Divorced", | |
complicated: "Takes some explaining", | |
open: "Open Relationship", |