Giter VIP home page Giter VIP logo

Comments (5)

apotonick avatar apotonick commented on June 14, 2024

I currently see no solution for that in Cells. The explicit #render does not track if it already rendered - and I think that's a good thing. I really don't like the hidden semantics of the before_filter in Rails. Can I help you otherwise?

What are you trying to do in your (real) before_filter? And, where are our comments?

from cells.

sobstel avatar sobstel commented on June 14, 2024

All comments seem to disappear silently.

I wanted to do redirect to different view when user is not authenticated (eg. to display him "Log in to comment" instead of comment form). Now Im doing following

def new
  return render :view => "new/noaccess" unless user_signed_in?
  render
end

Im not a big fan of filters, but as it works this way in controllers, I expected similar in Cells.

from cells.

apotonick avatar apotonick commented on June 14, 2024

Ok, that looks cool!

Cells are not all-mighty controllers as the ActionController, they are derived from AbstractController and have limited abilities. This is good.

BTW- did you already consider using view inheritance instead of if's? I could blog about that.........

from cells.

sobstel avatar sobstel commented on June 14, 2024

I am not really familiar with view inheritance in cells, so it would be great to read some more about it, especially how it could solve problems like pre-authorization.

Btw, another way I couldn't really find is how to handle forms to work smoothly with restful routing, eg. processing comment form embedded somewhere inside post site.

from cells.

apotonick avatar apotonick commented on June 14, 2024

I have to play around with authorization plugins, maybe we can do something easy and generic with what you call pre-authorization!

Could you post some more details about that restful problem, maybe in a separate issue?

from cells.

Related Issues (20)

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.