Coder Social home page Coder Social logo

rubymonsters / speakerinnen_liste Goto Github PK

View Code? Open in Web Editor NEW
75.0 16.0 61.0 106.16 MB

International Women* Speaker Directory

Home Page: https://speakerinnen.org

License: MIT License

Ruby 43.93% JavaScript 4.06% CSS 0.63% HTML 46.50% Dockerfile 0.04% Makefile 0.23% SCSS 4.60% Procfile 0.01%
rails women-speakers women-empowerment diversity railsgirls

speakerinnen_liste's Introduction

Build Status Code Climate

About speakerinnen.org

speakerinnen.org is a searchable web directory designed specifically for women conference speakers. Women speakers are encouraged to sign up and provide professional information, including their area of expertise, any previous conferences they've presented at, contact details, etc.

The aim of the app is to provide a way for conference and event organizers to find and contact appropriate women speakers. (But obviously there are many different contexts in which it can be used...)

Getting Started (Initial Setup)

  1. Clone the repository: git clone [email protected]:rubymonsters/speakerinnen_liste.git and access the folder: cd speakerinnen_liste. (If you have cloned the repository before and there is still an .env file, delete it.)
  2. Copy the file database.yml.sample and name it database.yml inside the config folder. (The sample-file is a placeholder showing the standard usecase. The file database.yml is for individual usage and changes and is ignored by git.)
  3. If you don't have Docker Engine installed, please download it here for your operating system.
  4. Run make setup (builds images, installs gems, creates and migrates the database).
  5. Run make seed (seeds database with example profiles and indexes them in Elasticsearch).

Local development with Docker (default) -> at the moment this doesn't work on Apple Silicon chips, we are working on a fix.

  • make dev (opens a development shell, rake, bundle or rails commands will work here)
  • make up (starts the app directly)
  • make stop (stops the container)
  • make test (runs all the tests)
  • make usage (get a list of possible commands)

Local development without Docker

In your database.yml: make sure host: db username: postgres and password: password are commented out. You can start a server or run the tests as usual.

Admin user

If you build or test admin features, you can use the test admin user to test those. The admin user can be found in db/seeds.rb.

Alternatively, assign the admin status to another user via the rails console:

# Open a dev shell
$ make dev

# Log into the rails console
$ bundle exec rails c

# Inside the rails console
user = Profile.find(<your-profile-id>)
user.admin = true
user.save

# Verify your user admin status
user.valid?

# => true

Testing

First, open a dev shell by running make dev.

# Run all tests of the project (same as running `make test`)
$ bundle exec rspec spec

# If the tests are still failing, run:
$ bundle exec rake db:test:clone

# If tests are still failing, run:
$ rails db:test:prepare

# Run tests excluding elasticsearch specs, so without a running elasticsearch server
$  bundle exec rspec spec --tag '~elasticsearch'

Please use Rubocop

# Open a dev shell
$ make dev
# Run rubocop and correct all errors it finds
$ rubocop -a

Database:

Our database schema looks like that:

db

Metrics

For seeing our metrics we use the free community edition of honeyycomb ( https://ui.honeycomb.io/login ) More infos how to use this: https://docs.honeycomb.io/beeline/ruby/

Report Errors

We are using honeybadger.

Deployment

We use Heroku to deploy.

Contributing

Do you want to contribute?

If you want to contribute, you can get an overview over the open issues on our Project Management Board and via #216.

We are happy to answer your questions if you consider to help. All the issues have a link to their specification. If you want to work on an issue feel free to assign yourself.

Find further details in CONTRIBUTING.md.

#Troubleshooting

Docker

Use upgraded Postgres version in Docker

If Postgres got upgraded in the docker-compose file, you need to delete all processes, images and volumes that still use the older version:

  1. Use make tear-down to delete all processes and images

  2. Delete all your local volumes inside Docker as well. (Otherwise you will get a DB connection error) Check for your speakerinnen volumes in Docker: docker volume ls Ouput will be a list of volumes, pick all the speakerinnen ones (Postgres, Bundle) and delete them (adjust the name if yours is different):

    docker volume rm speakerinnen_liste_postgres_data

    docker volume rm speakerinnen_liste_bundle

  3. make setup to recreate all images, processes and volumes.

  4. make seed to populate the volumes.

♥ Code of Conduct

Please note that speakerinnen has a Contributor Code of Conduct based on the Contributor Covenant. By participating in this project online or at events you agree to abide by its terms.

speakerinnen_liste's People

Contributors

a5308y avatar alonpeer avatar anneroth avatar annesbln avatar athomschke avatar bioshrimp avatar briocheberlin avatar carlad avatar cesc1989 avatar chatulli avatar dependabot-preview[bot] avatar dependabot[bot] avatar essymo avatar fidothe avatar greysteil avatar langjoh avatar lipenco avatar luki3k5 avatar n3k00n3 avatar nerdinand avatar netagonen avatar plexus avatar porras avatar sabrina-ulbrich avatar sferik avatar sray avatar thatbettina avatar tyranja avatar ur5 avatar zaziemo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

speakerinnen_liste's Issues

add default value to admin column in profile table

I want to add a default to the admin column in the profile table. But an error has occured :(
Whats wrong???

class AddDefaultValueToAdminAttribute < ActiveRecord::Migration
  def change
    change_column :profiles, :admin, :default => false
  end
end

Delete "New Profile" button

Since Profle is created during signup we need to take away the option to create new profiles (which as you can see in demo herokuapp one can do without being logged in even).

We can take away the button or also the real functionality, please specify what you did in commit message

tests...

It would be nice if we could work on the broken tests and add some new ones today.

can't db:migrate

have just pulled from master. getting this error when I rake db:migrate

C:/RailsInstaller/Ruby1.9.3/bin/rake: No such file or directory - pg_dump -i -s -x -O -f C:/Sites/speakerinnen_liste/db/structure.
sql  speakerinnen_development
rake aborted!
undefined method `exitstatus' for nil:NilClass

any ideas?

Learn IRC

IRC (Internet Relay Chat) is a dinosaur chat protocol from the stoneage, but it's still in good use http://en.wikipedia.org/wiki/Internet_Relay_Chat. As a programmer it's actually pretty useful to be able to use IRC and, e.g., hang out in some channels related to projects one is working on.

@chad invites all of you to "his" #shitfire channel in irc.freenode.net … I have no idea what that channel is about besides that it has a cool name ;) But that's a pretty cool opportunity for you to learn how to use IRC!

So, go grab some IRC client (on Mac OS X I personally like LimeChat), add the server irc.freenode.net, join the channel #shitfire and say hi to @chad :D

❤️ ❤️ ❤️

Permissions

Now everybody can edit and delete every profile. I guess, only the owner of a profile should have the permission for this (or maybe an admin).

Error when trying to create a new user in local host

I think this is a mini_magick problem.
It's looking for an image file that doesn't exist.

It's weird because i've been able to create profiles and upload photos before.
Have we changed how we handle images?

Errno::ENOENT in Devise::RegistrationsController#create

No such file or directory - identify -quiet -ping C:/Users/user/AppData/Local/Temp/mini_magick20130326-7968-17r38st.jpg
Rails.root: C:/Sites/speakerinnen_liste

Application Trace | Framework Trace | Full Trace
Request

Parameters:

{"utf8"=>"✓",
 "authenticity_token"=>"JB0WyZDu4pVjqBystn10lHdSqChokEdYRL0MM0LtzCI=",
 "profile"=>{"firstname"=>"Capy",
 "lastname"=>"Bara",
 "bio"=>"rodentish mammal ganze grosse wide welt",
 "topics"=>"foraging in rubbish",
 "languages"=>"ratspeak",
 "city"=>"global",
 "twitter"=>"@ratty",
 "picture"=>#<ActionDispatch::Http::UploadedFile:0x3ef7408 @original_filename="ad0a87e82a8f1a56902c933810689eecbabcbb1c-1361288436.jpg",
 @content_type="image/jpeg",
 @headers="Content-Disposition: form-data; name=\"profile[picture]\"; filename=\"ad0a87e82a8f1a56902c933810689eecbabcbb1c-1361288436.jpg\"\r\nContent-Type: image/jpeg\r\n",
 @tempfile=#<File:C:/Users/user/AppData/Local/Temp/RackMultipart20130326-7968-xpmxqq>>,
 "email"=>"[email protected]",
 "password"=>"[FILTERED]",
 "password_confirmation"=>"[FILTERED]"},
 "commit"=>"Sign up"}

Needs a readme file

There should be a readme file that explains what we're doing here and why.

Who's up?

bootstrap

what do I miss, bootstrap doesnt seem to work on my computer:

in the Gemfile:

gem 'bootstrap-sass'

and then I

bundle install

what else?

css override doesnt work on heroku

It makes me wanna cry!

In localhost it looks perfect, but when I push it to heroku, the css I wrote doesn't work! First I wrote it in custum.css.scss after the @import stuff. Then before the @import stuff and now its in the profile.css.scss. All the versions worked in localhost but none on heroku.

Suggestions? Any?

Twitter Login / Sign up - wrong redirect

Heroku: if I sign up with twitter and fill in my profile details I can't edit them afterwards. If I want then to sign in again with twitter I'm redirected to the Login page which requires my passwort. Since I haven't set a password (as I signed in with twitter and there it isn't required) I can't get back to my profile settings.

localhost: there are no such problems

why cant I use a controller method in the view?

I want to make sure, that only an admin gets an admin link in the header. Now I am using:

<% if current_profile && current_profile.admin == true %>
          <%= link_to "admin", admin_profiles_path %>
        <% end %>

in the view: https://github.com/rubymonsters/speakerinnen_liste/blob/master/app/views/layouts/application.html.erb

which works, but doesnt look nice! I want to use that method:

 def authenticate_admin!
    unless current_profile && current_profile.admin?
      redirect_to profiles_url, notice: (I18n.t("flash.profiles.no_permission"))
    end
  end

from that controller:
https://github.com/rubymonsters/speakerinnen_liste/blob/master/app/controllers/application_controller.rb

but I always get: undefined method error message!

Make progress!

I need to find more places to hook up this image, so here you go:

Extract profile.fullname

@tyranja one guideline for good rails code is that views should be as simple as possible, and have as little logic as possible. what exactly that means of course is subject to discussion :) but how about extracting this: https://github.com/rubymonsters/speakerinnen_liste/blob/master/app/views/profiles/_profile.html.erb#L4-L6

  <h3 class="profile_name">
    <%= link_to profile_path(profile) do %>
    <%= profile.firstname %>&nbsp;<%= profile.lastname %>
    <% end %>
  </h3>

It'd read better if one could just do:

  <h3 class="profile_name">
    <%= link_to profile.fullname, profile_path(profile) %>
  </h3>

For that you'd implement a method fullname on the model Profile, and unit test it.

Also, you can get around adding the html special char &nbsp; by using the CSS property white-space: nowrap instead (https://developer.mozilla.org/en-US/docs/CSS/white-space). Since "do not wrap this" is a presentation/style concern it's better to leave it to CSS. Also, that way your fullname method can stay cleaner and just use a single space to separate the names.

Heroku ignores the new column when updated

I wrote a new migration which added a column called talks and it all works fine locally.

Then pushed it to heroku and wrote run rake db:migrate and in the heroku console I can see that the column is there and is always nil, but when I login and edit my profile and fill in the new form it says:

"Profile was successfully updated."

But it isnt. Its still nil. Did I forget something? Or do I have to delete all the data in the heroku database?

New route for new Search

I'm getting the following error message:

No route matches {:action=>"show", :controller=>"profiles", :id=>#<Search profile_id: 4, bio: "Lorem ipsum dolor sit amet, consectetur adipiscing ...", firstname: "Rosa", lastname: "Luxemburg", languages: "communism, lisp", city: "Berlin", tag: nil>}

I know it has to do with the fact that in our SQL VIEW we asked to show profiles.id AS profile_id.

Why did we do this? Do we need to? And if so then how do I now set up the route...

Capybara

I am trying to sign in via Capybara:

fill_in('profile[email]', :with => '[email protected]')
fill_in('profile[password]', :with => '12345678')
click_button "Login" 

do I have to use the mail and password data from the fixtures?

Profiles per User

How many profiles should a user have? Right now I can have more than one. Better would be to have one per user. We have to specify this with the others.

test

did the tests work on monday, because all I get is:

ActiveRecord::RecordNotUnique: SQLite3::ConstraintException: column email is not unique: INSERT INTO "users" ("created_at", "updated_at", "id") VALUES ('2013-02-27 12:12:14', '2013-02-27 12:12:14', 298486374)

what is that?

heroku says sorry, but something went wrong

when I want to sign up without or with twitter. Just logging in with my username and password works.

I did

heroku logs 

and it gave me this:

ActionView::Template::Error (undefined local variable or method `provider' for #<Profile:0x00000004b69eb0>):
2013-04-24T20:08:36.873787+00:00 app[web.1]:   Rendered devise/registrations/new.html.erb within layouts/application (15.7ms)

2013-04-24T20:08:36.873901+00:00 app[web.1]: Completed 500 Internal Server Error in 17ms

I tried to find something usefull in the internet and tried it with:
http://stackoverflow.com/questions/10067359/heroku-were-sorry-but-something-went-wrong-due-to-javascript-include-tag

heroku create --stack cedar

but it didnt change anything :(

some ideas?

staging and production app

to be more professional, we should have two online apps on heroku.
I added now a staging app, so we push our changes first to the staging app and check if everything is okay and then we push it to the production app, which should always work.

thats how I changed the .git/config file in my speakerinnen directory:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
  url = [email protected]:rubymonsters/speakerinnen_liste.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[remote "production"]
    url = [email protected]:speakerinnen-liste.git
    fetch = +refs/heads/*:refs/remotes/heroku/*
[remote "staging"]
    url = [email protected]:staging-speakerinnen-liste.git
    fetch = +refs/heads/*:refs/remotes/heroku/*
[color]
    ui = true

and when I now push stuff to heroku I write

heroku push staging master

and later when its finished

heroku push production master

I will have to add all of you as collaborators on heroku.

I hope I didnt forget anything!

How to get conference organizers to use our app

So here's a summary of what Jan, the organizer of JSConf, told me:

  1. He asked me if this was a real product, where we'd charge organizers say 30 euros per conference to use.

I know that this is not our goal, but I found it really encouraging that he thought SpeakerInnen_Liste could be a viable product.

  1. He said that it's a LOT more work to do outreach to get more diverse speakers.

His workflow for recruiting speakers is

  1. make a spreadsheet of everyone he knows personally who might be good. For JSConf, he'd estimate that it was about 35 speakers from his social networks, which are Twitter and Github (not LinkedIn or Xing or Facebook).
  2. email to ask them to speak, trying to get them sold on the event itself as the perk or else that the reach / community aspect of being a speaker is worthwhile
  3. half of them did not answer, the other half emails back with one of three questions:
    • "I don't know what to talk about"
    • "I've never given a talk"
    • lack of mechanics--don't know how to use slides, etc.
  4. email personally every single one of them, pointing them to template slide decks, local user groups where they can practice speaking, and working with them on finding topics.

This takes a lot of time. It's like being a speaker coach to 15 people.

They tried to make this simpler by having the website weareallaweso.me

Despite keeping all the resources on that website, he still has to track

  • to whom he's spoken/emailed
  • what he needs to email them or if he's waiting to hear back from them
  • the entire funnel, taking them through the process to get them to submit a proposal

I asked him if he thought that pairing people up would help but the speakers really need to be paired with someone with experience. One of his ideas was to contact the speakers 'alumni' to ask them to help coach new speakers.

Lastly, Jan mentioned Lanyrd as a model to consider, as its a community resource where people can help, review slides, etc. I didn't really see the community aspect of it, but it seems like what Lanyrd does is create a profile for every speaker at all the conferences they cover: http://lanyrd.com/profile/opheliabenson/
They aggregate media of past talks as well as list when/where speakers are talking next. I secretly love this, because they've already created your profile for you! But it's also a bit scary how stalker-ready this is.

Jan's specific requests for us were

  1. work on the design
  • It would be easy to tap a box next to a speaker to email them about the event, where the speaker could respond by with yes, no, maybe, follow up with some questions.
  1. filter function--other databases are hard to explore because they just list people alphabetically, which has NO real impact on whether you'll email them or not. He wants a "Yelp experience"--where you press one button to find crowdsourced results for, as an example, a Ruby conference in Israel and they are all available for your events' time.

He does not want to fill out a database form, because organizers have no time and please don't make them think.

  • For budget-conscious organizers they need to find speakers around them, so we should add location information.
  • He mentioned that it would be great if we can see what time they're available, but I think this is more complicated and a little too much information (like surveillance/stalker style).
  1. to curate the speakers, so it's not just anyone who can sign up but at the same time to not discourage anyone with a test they have to pass.
  • my personal thought was to sort the speakers according to how close they are to the organizers' twitter network.
  • for the strangers, recordings of previous talks or slidedecks are important, esp. so that organizers can hear for themselves how well speakers can speak in their non-native languages.
  • Jan mentioned that he would like to share with other organizers how easy speakers were to work with, but I didn't think this information belonged on a public website. Attendees review speakers on Joind.In : http://joind.in/talk
    But when I went to the website, talks and events were rated. I didn't see where you could search for speakers.
  1. Identify which languages are our speakers' natural native languages, since organizers want to make sure that they are good enough to be understood in their second / third languages.
  2. make it easy for organizers!

There is a need for this. 30-40 events have stolen their cfp from github: https://github.com/jsconf/2012.jsconf.eu
But most conference organizers don't get the idea yet of working on diversity.

He personally saw the benefits of getting 15-20% women speakers at his event being:

  • it's not odd anymore to be a woman there
  • no more 'frat boy'-feel to the conference -- it's more grownup
  • better talks

And he's totally open to skyping with us about this.

New GitHub Workflow

Now that we have more people working on SpeakerInnen, please code and push to your own branches on GitHub.

Also, instead of pulling, please fetch and then merge.

Command line commands to push to your own branch on GitHub

  • 1. git checkout -b newdesign

    This creates a new branch called "newdesign" in your local repository.

  • 2. git commit
  • 3. git push origin newdesign:newdesign

    This pushes from your remote repository from your local branch "newdesign" to a GitHub branch called "newdesign".

    Keep coding on and pushing to your branches until your code does not break.

  • Command line commands to integrate your working code to master

  • 1. git fetch origin
  • 2. git checkout origin/newdesign

    Check the code on the branch.

  • 3. git checkout master

    Move to master branch.

  • 4. git merge origin/newdesign

    You merge the "newdesign" branch to master branch.

  • 5. git commit
  • 6. git push
  • javascript question

    Now we have that javascript for adding tags to the formfield:

    <script type="text/javascript">
      $(".add-tag-trigger").click(function() {
        var nameOfTag    = $(this).html();
        var existingTags = $("#tag-field-form").val();
        //check if tag is in the list of tags
        if (existingTags.indexOf(nameOfTag) < 0) {
          $("#tag-field-form").val(existingTags+', '+nameOfTag);
        }
      });
    </script>

    But it looks ugly, because in case there is no tag inside the tag-field-form, its adding first a commata and an empty space.

    To change that I wrote another if interation, but it doesnt work:

    <script type="text/javascript">
      $(".add-tag-trigger").click(function() {
        var nameOfTag    = $(this).html();
        var existingTags = $("#tag-field-form").val();
        //check if tag is in the list of tags
        if (existingTags.indexOf(nameOfTag) < 0) {
          if (existingTags.length = 0) {
            $("#tag-field-form").val(nameOfTag);
          else
            $("#tag-field-form").val(existingTags+', '+nameOfTag);
          }
        }
      });
    </script>

    Any suggestion why?

    Links one should see

    when not logged in one should see:

    • speakerinnenliste (listing to home page)
      -profiles (listing to all profile already existing

    -signup
    -login

    when logged in:
    -speakerinnenliste

    • profiles
    • my profile (where one can view profile and edit it)
    • Logged in as ...
    • Account (where one can edit password and stuff)
    • Sign out

    And of course in middle of both the big search box, but we have that in another issue

    Trying to bundle install and keep getting this error

    Some background: due to technical issues I've had to ditch Ubuntu and develop on Windows 7. I've been able to install ruby and rails and could get our text-to-squares app working okay. But speakerinnen is proving more difficult.

    Can anyone tell me where i can find the extconf.rb file and what it should have in it...

    C:\Sites\speakerinnen_liste>gem install json -v '1.7.6'
    Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while...
    ERROR:  Error installing json:
            ERROR: Failed to build gem native extension.
    
            C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)
    
    
    Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.7.6 for inspection.
    Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.7.6/ext/json/ext/generator/gem_make.out
    

    intergational tests

    GIVEN:
    index.html

    WHEN:
    -> press login-button

    THEN:
    -> login-site

    We are on the index.html, when user presses login button, she gets redirected to the login-site.

    -> We are on the login.html, user has to write name and password and gets redirected to the user-profil.

    We are on the index.html, when user presses register button, she gets redirected to the register-site.

    -> We are on the register.html, user has to register with email adress/twitter, new user was created.

    We are on the index.html, when searcher presses the show-list button, gets redirected to all_speakerinnen.html.

    -> We are on the the all_speakerinnen.html and the speakerinnen are sorted by new date.

    How to test for security breaches

    I think me logging in with Twitter on to SpeakerInnen was a security risk Monday. On Monday night my Twitter account was hacked into and "I" tweeted something about Barbies with a suspicious link.

    Admittedly, I was using code from about a month ago and then switched to the most current one on master.

    So how can I test for security? How can I figure out if my Twitter account was hacked through SpeakerInnen or through something else?

    And is there a test twitter account for this project already?

    debug "media" code

    a field--"media" was added --where the speaker/innen can add videos and mp3s to their profiles, but that ran into database trouble and it is not sure that it really works.

    7 Last Tasks

    Ok so we're almost done with SpeakerInnen, and I think we only need to do the following seven things to be able to test if speakers and conference organizers will use it:

    • implement responsive design in html/css
    • brand for RoR community
    • make obvious how search function works through design
    • code a way to contact people easily through email through the site
    • deploy to production with real domain name?
    • make sure that our code is secure (check out my Twitter account being compromised for more details)
    • debug my media code

    Does anyone else think we need anything more before we put SpeakerInnen out to the world? You can see what I think as secondary priorities below--ie, features that are nice to have but not a must for someone to want to use our site.

    Anything you see above that should move to secondary priorities?

    I am going to work on debugging my media code and Magda is working on the design. Charlotte, were you interested in working on branding/visual identity for the site?

    It would be great if someone could test the security of our code and add a contact form to the profiles so that the emails are not shown.

    Second priorities

    • sign up 50 speakerInnen
    • allow to register as a non-speaker (e.g. conf organizer)
    • add moderation of profiles (so moderators would review them before they're published) including emails
    • add media field feature
    • clean up code and improve tests
    • identify which languages are our speakers' natural native languages, since organizers want to make sure that they are good enough to be understood in their second / third languages
    • filter function--other databases are hard to explore because they just list people alphabetically, which has NO real impact on whether you'll email them or not. Give one search button to find crowdsourced results for, as an example, a Ruby conference in Israel.
    • sort by distance from your event location
    • sort the speakers according to how close they are to the organizers' twitter network.
    • add slidedecks of previous talks

    _language_navigation

    Hej Sven, thats propably the perfect question for you:

    I created a link to change the I18n.locale from English to German and backwards. And it works, only when I visit the contact and impressum page it doesnt. Its always changes to English, if when the locale was german before.

    The routes are:

    SpeakerinnenListe::Application.routes.draw do
    
      devise_for :profiles
    
    
    
      get 'topics/:topic', to: 'profiles#index', as: :topic
    
      match 'search' => 'search#search'
    
      match 'contact' => 'home#contact'
    
      match 'impressum' => 'home#impressum'
    
      scope "(:locale)", :locale => /en|de/ do
        root :to => 'profiles#index'
        resources :profiles, :except => [:new, :create]
      end

    Is there the mistake with the matching stuff? And actually I would like to use for impressum and contact seperated german pages like: impressum.de.html.erb. How would that work?

    I pushed it on a branch:
    https://github.com/rubymonsters/speakerinnen_liste/tree/ty_language_navigation

    Clean Twitter string

    A question:

    Am I going to interrupt Devise with a before_save callback?
    Or am I going to apply a before_save to the Active Record?

    The reason I ask is that callbacks are possible with Devise through Waren. But Waren only has a after_set_user method. If I was to use this I would update the initializers/devise.rb file, although I'm still trying to understand the syntax of what I need to write.

    http://rubydoc.info/github/hassox/warden/master/Warden/Hooks#after_set_user-instance_method

    So do I try to do it this way, or do I do a before_save hook on ActiveRecord? And if Actice Record, then where??

    bit of a layout mess

    as far as I can see is the layout a bit confusing now and its hard to implemend something new, so maybe if someone changes some design stuff, she should do it first on a branch and then merge it later, when the layout is fixed?

    @lipenco can I try to go back to the old layout/commit and you open a new branch with the new layout and we merge it later when everything looks fine?

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.