Hi,
Need some help gathering thoughts on this issue.
Our team is moving ahead with the idea that separating the authenticated and public sections of our app in two separate folders will allow us to be more organized and secured.
I have seen this approach for Admin apps within the site but never for authentication.
We are currently usi...
I have an admin controller located in controllers/admin/admin_controller.rb
I also have a pages controller located in controllers/admin/pages_controller.rb
pages_controller.rb inherits from admin_controller.rb
in routes.rb, I have an admin namespace as such:
map.namespace :admin do |admin|
admin.resources :pages
end
I want the adm...
i wrote a simple function in controller
public string LinkProjectSquareFilter(int squareId)
{
return squareId.ToString();
}
how can i call it from view? it say The name 'LinkProjectSquareFilter' does not exist in the current context
...
I have an element for my side bar navigation being called from my layouts/default.ctp file, I need to access some data about categories from my Photos controller. How would I go about doing this?
...
Hi!
I need some advice about how should I start coding something.
So here is the context:
I've just finished building a CMS that manage a SQLite database. My application will be picking this database and use its content as the application's content. So far it's pretty simple.
The application will have a navigation that will browse thr...
I was attempting to make changes to my controller, and all of a sudden, I no longer seem to receive any requests (404 when attempting to hit the servlet mapped URLs). I'm sure I've broken my web.xml or app-servlet.xml, but I just don't see where. I can access index.jsp from tomcat (http://IP/app/index.jsp), but I can't get my servlet map...
I have controller with action new, and I want it to create ActiveRecord::Base descendant object, and write it into database (without showing it to user).
def new
active_order = current_user.orders.find {|o| o.status > 0 }
active_order = Order.new if active_order.nil?
(...)
end
Order.new creates local object, but my question is -...
i have 2 actions
public ActionResult FilesAdd(int id)
{
FillParentMenuDDL(id);
return View();
}
[HttpPost]
public ActionResult FilesAdd(int id)
{
//some logic...
FillParentMenuDDL(id);
return View();
}
but it is error because of same parameters, but i need only one param...
Hello,
I'm wrestling with something that should be very simple - specify a sidebar at the controller level. With layouts you can do this:
layout 'admin'
so I'd like to do the same for a sidebar, with something like this:
sidebar 'search'
I know I could specify the sidebar markup with content_for in the views, but I'd rather specif...
Hello fellow programmer
I came from PHP language(codeigniter), but now I learning ASP.Net MVC :)
In PHP codeigniter we can catch the post variable easily with
$this->input->post("theinput");
I know that in ASP.Net MVC we can create an action method that will accepts variable from post request like this
public ActionResult Edit(str...
I am trying to implement RESTful urls in my Spring MVC application. All is well except for handling form submissions. I need to redirect either back to the original form or to a "success" page.
@Controller
@RequestMapping("/form")
public class MyController {
@RequestMapping(method = RequestMethod.GET)
public String setupForm()...
I'd like to communicate with an Embedded Controller device in a Notebook through I/O ports 62/66. When running on XP, the communication might collide with "Microsoft ACPI-Compliant Embedded Controller" driver which does the same thing. Therefore, I’d like to know whether (and how) I can communicate with I/O ports 62/66 using this driver....
I started using netbeans to design forms to edit the instances of various classes I have made in a small app I am writing. Basically, the app starts, an initial set of objects is selected from the DB and presented in a list, then an item in the list can be selected for editing. When the editor comes up it has form fields for many of the ...
Hello,
I recently started reading about ASP.net MVC and after getting excited about the concept, i started to migrate all my webform project to MVC but i am having a hard time keeping my controller skinny even after following all the good advices out there (or maybe i just don't get it ... ).
The website i deal with has Articles, Videos,...
Hello,
I am trying to generate a controller with all the RESTful actions stubbed. I had read at link text that all I needed to do was to use call the generator with just a controller name I would get just that. So, I ran "script/generate rspec_controller Properties" and I got an empty controller.
Any other suggestions would be great...
I need some advice, what is the rule of the thumb when creating Rails controllers names?
Should controller be all be verbs or a combination of nouns and verbs (or adjectives)?
This is the example provided on creating controllers in Rails,
./script/generate controller CreditCard open debit credit close # which is a combination of nouns...
Hey Guys, I’ve stucked with a problem.
Can any body help me for….. “How to use foreach() in any controller function of Codeigniter”. Actually, i’ve a piece of codes which are placed in a Controller function in whihc i’m using foreach(). Here is the piece of code…..
$this->load->model('board/dboard_members_model');
$data['query4'] = $thi...
I'm using CakePHP but it's a question about the MVC pattern. I have in my form the input-text for the tags (separated by commas). To add the tags I've created a Tag model method that basically check if the tag exists and then add the new tag or just a new unit in the tag counter (the Tag model has these fields: id, name, slug, count).
In...
I'm working with code igniter and for some reason, the url http://mysite.com/account/100 gives me a 404 error but http://mysite.com/account actualy works. Here's what my controller account.php looks like.
class account extends Controller {
function account()
{
parent::Controller();
}
function index()
{
...
Consider a StaticResourceController that locates and serves files.
I've set up an explicit route for "favicon.ico" that will handle the request for this file using StaticResourceController:
routes.MapRoute(
"favicon",
"favicon.ico",
new { controller = "StaticResource", action = "Get", file = "favicon.ico", area=...