Coder Social home page Coder Social logo

smhw-event-calendar's Introduction

smhw-event-calendar

Features

  • On /events page, we need to have a weekly calendar highlighting today. We need to be able to create an event which has start and end dates and a description.
  • The created events should instantly show on the calendar with an indicator on start date column and another one for the end date column. An image with ideal interface is shown on the page.
  • Events should be saved in a backend store without refreshing the page.
  • You may use any gems/plugins.
  • Commit changes to git often with descriptive messages.
  • This should not take more than 2 hours.

Setup

Make sure your bundle is up to date:

bundle

To run the application:

bin/rails s

You can lint all factories and run the test suite by simply running:

rake

Or if you just want to run the specs:

bin/rspec

Review

I've generally tried to commit often so hopefully you can appreciate the outside-in nature of the development process. I haven't used Cucumber as I only tend to use that when working directly with clients. There's feature specs that drill through the whole user journey supported by controller and model specs.

A few thoughts:

  • I decided to pass the data through to JS on the page using a simple view helper. Equally could have:
  • Used gon which might be preferable with lots of variables being rendered or polled continuously
  • Passed a URL as an option to fullcalendar during initialisation to fetch events from
  • I've opted to override the as_json method which is implicitly called during render to ensure only white-listed attributes are exposed.
  • However for more complex responses I might have considered Active Model Serializers instead for greater flexibility.

smhw-event-calendar's People

Contributors

kophyo avatar stuartbates avatar

Watchers

 avatar  avatar

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.