Code Monkey home page Code Monkey logo

Comments (5)

mccalltd avatar mccalltd commented on August 16, 2024

Yep, it's not inherited. I can change that no problem, or you could submit your first patch? Just modify the RouteAttribute.

On Mar 15, 2012, at 6:07 PM, Phillip Haydon wrote:

We have an action on our base controller with a JavaScriptResult to serialize page translations to another language, it simply outputs a JSON object for us to use in JavaScript.

The action is defined in the base controller since the implementation is identical in every controller, the sub-class has a property which defines a parameter to query the db with to get the correct translations.

It seems however that defining a route in the base class:

[GET("GetPageTranslation")]
public JavaScriptResult GetPageTranslation()
{
...
}

Doesn't get mapped.

I've added a work-around for this by defining the route in the global asax file:

routes.MapRoute("PageTranslations", "{area}/{controller}/GetPageTranslation", new { action = "GetPageTranslation" });

This over-comes the issue. But think this is something that AR should handle.


Reply to this email directly or view it on GitHub:
#55

from attributerouting.

phillip-haydon avatar phillip-haydon commented on August 16, 2024

Would love to submit my first patch. Will try submit one this weekend :D

from attributerouting.

mccalltd avatar mccalltd commented on August 16, 2024

Awesome! Wasn't trying to delegate, just would like to get the most vocal users involved in dev. Thanks!

On Mar 15, 2012, at 6:12 PM, Phillip Haydon wrote:

Would love to submit my first patch. Will try submit one this weekend :D


Reply to this email directly or view it on GitHub:
#55 (comment)

from attributerouting.

phillip-haydon avatar phillip-haydon commented on August 16, 2024

I've submitted a PR here #56

Hope it's ok.

from attributerouting.

mccalltd avatar mccalltd commented on August 16, 2024

Issue superseded by #56

from attributerouting.

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.