Code Monkey home page Code Monkey logo

2015-02-2013-daily-feminist-affirmation-project2's People

Contributors

hilarysk avatar

Watchers

 avatar  avatar

2015-02-2013-daily-feminist-affirmation-project2's Issues

Feedback

๐Ÿ‘

But here are some things you can think about for taking it to the next level:


https://github.com/hilarysk/2015-02-2013-daily-feminist-affirmation-project2/blob/master/main.rb#L20-L21

I totally get this preference of organizing controllers/views. Just making a note here, because it won't always be possible. (E.g. Rails prohibits it.)


https://github.com/hilarysk/2015-02-2013-daily-feminist-affirmation-project2/blob/master/models/class-module.rb#L24-L26

Better: Indicate the type of object these options should be set as. Otherwise, can be hard to know if it's possible to find specific row(s) based on one field/value pair versus many. (This becomes apparent after reading the method body, but it's easier to learn that from the comment.)

...

Related: What would happen if you required options["value"] to be an array? You'd have to loop through it whether it was actually a collection of many values, just a single value, or a single integer. But would the resulting logic feel any better?


https://github.com/hilarysk/2015-02-2013-daily-feminist-affirmation-project2/blob/master/models/class-module.rb#L242-L247

Even better, return self. That way, you delete the thing and still have an easy way to access its attributes in that action โ€“ e.g.:

# Controller
@thing = Thing.delete("things", 2)
<p>Confirmed: You just deleted thing #<%= @thing.id %></p>

https://github.com/hilarysk/2015-02-2013-daily-feminist-affirmation-project2/blob/master/views/controllers/admin.rb#L1-L21

Do you need to re-require all of this stuff?


https://github.com/hilarysk/2015-02-2013-daily-feminist-affirmation-project2/blob/master/views/controllers/public.rb#L90

What if you tried something like:

erb :"public/#{item.keys[1]}", :layout => :"/alt_layouts/public_layout"

Would that accommodate all of the erb calls in this handler?

(We talked about this before, but not sure if you had a chance to experiment with it.)


https://github.com/hilarysk/2015-02-2013-daily-feminist-affirmation-project2/blob/master/views/layout.erb#L2

<body> is the beginning of the HTML document's content. Everything, from wrappers to headers to footers, all goes inside of it.


https://github.com/hilarysk/2015-02-2013-daily-feminist-affirmation-project2/blob/master/views/admin/login.erb#L7

Better: <label> tags for the text accompanying form fields.

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.